Opened 6 years ago

Last modified 6 years ago

#30062 closed New feature

Add UniqueConstraint condition parameter — at Version 2

Reported by: Pavel Tyslacki Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

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 (2)

comment:1 by Simon Charette, 6 years ago

Description: modified (diff)
Triage Stage: UnreviewedAccepted

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).

comment:2 by Tim Graham, 6 years ago

Description: modified (diff)
Has patch: unset
Note: See TracTickets for help on using tickets.
Back to Top