Re: More eyes on Check Constraints

2017-09-10 Thread Aymeric Augustin
Hello, I reviewed the PR today — better late than never... It's looking good and it would be a great addition to Django 2.0. The biggest outstanding problem is code duplication in django.db.models.sql.query. Advice from people who know a bit about this module would help a lot. Search for "It m

Re: More eyes on Check Constraints

2017-08-13 Thread Ian Foote
Hi David, That's an interesting idea. I haven't thought very deeply about composite foreign keys myself, so I can't say for certain how easy it would be to build on top of my work. I did a quick search for prior discussion about this and found https://code.djangoproject.com/wiki/MultipleColumnPri

Re: More eyes on Check Constraints

2017-08-13 Thread David Sanders
Hi Ian, Interestingly enough I'd just recently written https://github.com/rapilabs/django-db-constraints based on Matt Schinckel's idea. I wrote that because although check constraints are great, I really wanted a way to supply any type of constraint - primarily composite foreign keys. I don

More eyes on Check Constraints

2017-08-10 Thread Ian Foote
Hi all, I've been working on https://code.djangoproject.com/ticket/11964 to add support for Check Constraints to the Django ORM and migrations framework. My work can be found at https://github.com/django/django/pull/7615. I think the functionality is basically there, so what it really needs