Opened 4 years ago
Closed 4 years ago
#31745 closed Bug (fixed)
Add errors when UniqueConstraint.deferrable is combined with index specific parameters
Reported by: | Hannes Ljungberg | Owned by: | Hannes Ljungberg |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Release blocker | 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
UniqueConstraint
should throw an error when deferrable
is combined with parameters which require the usage of an explicit unique index through CREATE UNIQUE INDEX
. This was missed when UniqueConstraint.include
and UniqueConstraint.opclasses
was added. We should also add documentation about this incompatibility.
Change History (3)
comment:1 by , 4 years ago
Has patch: | set |
---|
comment:2 by , 4 years ago
Severity: | Normal → Release blocker |
---|---|
Triage Stage: | Unreviewed → Accepted |
Thanks, IMO raising an exception is enough, we don't need to document this.
It's a bug in new features added in 7edc6e53a746af995e3b89d53d37938dd8fc46aa and 8c7992f658e1125f8dc20b19206e8bbbe4187372.
PR: https://github.com/django/django/pull/13115