You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Django has no validation for unique indexes (see this part of the Django code). As far as I can tell, you can pretty easily query partially unique fields just as easily as you can query fully unique(_together) fields.
For projects we've been using our own hacked version of the django-partial-index plugin, which provides a mixin that adds validations for these kind of partial indexes. We could migrate away from this plugin and use standard Django indexes with conditions, if Binder model would extend full_clean to check partial indexes as well.
Also: Maybe make a PR for Django for this so in the long run we can drop this again?
The text was updated successfully, but these errors were encountered:
Django has no validation for unique indexes (see this part of the Django code). As far as I can tell, you can pretty easily query partially unique fields just as easily as you can query fully
unique
(_together
) fields.For projects we've been using our own hacked version of the django-partial-index plugin, which provides a mixin that adds validations for these kind of partial indexes. We could migrate away from this plugin and use standard Django indexes with
conditions
, if Binder model would extendfull_clean
to check partial indexes as well.Also: Maybe make a PR for Django for this so in the long run we can drop this again?
The text was updated successfully, but these errors were encountered: