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?
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_cleanto check partial indexes as well.Also: Maybe make a PR for Django for this so in the long run we can drop this again?