﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
35992	Migrations crash on constraints/indexes with CompositePrimaryKey.	Mariusz Felisiak	Mariusz Felisiak	"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.
{{{#!sql
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."	Bug	closed	Database layer (models, ORM)	dev	Release blocker	fixed			Ready for checkin	1	0	0	0	0	0
