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't suppose that this would be a possibility 
as a future extension of your pull request?

Cheers,
David


On Friday, August 11, 2017 at 4:15:26 AM UTC+10, Ian Foote wrote:
>
> 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 is 
> some testing on real-world use-cases and more eyes to suggest any 
> further simplifications or improvements that may be possible. 
>
> Thanks, 
>
> Ian 
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/537b284f-400c-45c9-8f3b-91842c83f6d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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/MultipleColumnPrimaryKeys and
https://code.djangoproject.com/ticket/373. These are probably a good
place to start - I plan to have a good read over the next week.

Your library also looks interesting. I also plan to take a close look to
see if there's anything I can learn from there. I wonder if it's worth
trying to converge our implementations - if my patch lands in Django it
would be great to have a compatible implementation that people can use
on earlier versions.

Thanks,
Ian

On 13/08/17 17:44, David Sanders wrote:
> 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't suppose that this would be a
> possibility as a future extension of your pull request?
> 
> Cheers,
> David
> 
> 
> On Friday, August 11, 2017 at 4:15:26 AM UTC+10, Ian Foote wrote:
> 
> 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 is
> some testing on real-world use-cases and more eyes to suggest any
> further simplifications or improvements that may be possible.
> 
> Thanks,
> 
> Ian
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Django developers (Contributions to Django itself)" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to django-developers+unsubscr...@googlegroups.com
> .
> To post to this group, send email to django-developers@googlegroups.com
> .
> Visit this group at https://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/537b284f-400c-45c9-8f3b-91842c83f6d8%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/999b4720-dfa3-4442-a406-0d577d4339b1%40feete.org.
For more options, visit https://groups.google.com/d/optout.