Opened 3 months ago
Closed 2 months ago
#35992 closed Bug (fixed)
Migrations crash on constraints/indexes with CompositePrimaryKey.
Description ¶
I've created a sample project that tries to add UniqueConstraint
with a CompositePrimaryKey
. Unfortunately, it crashes with programming error because CompositePrimaryKey
is resolved to tuple, e.g.
CREATE UNIQUE INDEX "uq_mix" ON "test373composite_release" (("version", "name"));
File "/ticket_373_uq_composite/lib/python3.12/site-packages/psycopg/cursor.py", line 97, in execute raise ex.with_traceback(None) django.db.utils.ProgrammingError: syntax error at or near "," LINE 1: ..."uq_mix" ON "test373composite_release" (("version", "name")) ^
I've attached a sample project. I can prepare a patch in the coming days.
Change History (6)
by , 3 months ago
Attachment: | ticket_373_uq_composite.zip added |
---|
comment:1 by , 3 months ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:4 by , 2 months ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Thank you for testing!