Add UniqueConstraint condition parameter
According #29641 and #29547, add support of conditional unique constraint.
Postgresql and sqlite support it as unique index: CREATE UNIQUE INDEX ... WHERE condition
, for unsupported databases this constraint will not be applied at all.
Change History
(7)
Description: |
modified (diff)
|
Triage Stage: |
Unreviewed → Accepted
|
Description: |
modified (diff)
|
Has patch: |
unset
|
Has patch: |
set
|
Patch needs improvement: |
set
|
Owner: |
changed from nobody to Pavel Tyslacki
|
Patch needs improvement: |
unset
|
Status: |
new → assigned
|
Resolution: |
→ fixed
|
Status: |
assigned → closed
|
I don't think deprecating
index_together
is currently planned but the documentation do suggest it might be in the future.I adjusted the ticket description and created #30063 so this ticket can focus on
UniqueConstraint(condition)
.