hello,

Looking at [1], I can see examples where one can check at database level, 
that a model field min_foo satisfies a constraint such as "min_foo > 5".
How do you write a constraint involving two different fields like  "min_foo 
< max_foo" or "discounted_price < price" ?

PostgreSQL doc shows how to write such constraint but how to express those 
with Django 2.2 ?

[1] https://docs.djangoproject.com/en/2.2/ref/models/constraints/

Best regards

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/43d1b1aa-9261-4ebc-b54f-761959c01c31%40googlegroups.com.

Reply via email to