#23740: Cannot drop unique_together constraint on primary key
-------------------------------+--------------------
Reporter: lanzz | Owner: nobody
Type: Uncategorized | Status: new
Component: Migrations | Version: 1.7
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
I have an erroneous {{{unique_together}}} constraint on a model's primary
key ({{{unique_together = (('id',),)}}}) that cannot be dropped by a
migration. Apparently the migration tries to find all unique constraints
on the column and expects there to be only one, but I've got two — the
primary key and the {{{unique_together}}} constraint:
{{{
Indexes:
"foo_bar_pkey" PRIMARY KEY, btree (id)
"foo_bar_id_1c3b3088c74c3b17_uniq" UNIQUE CONSTRAINT, btree (id)
}}}
Database is PostgreSQL, if that makes any difference.
--
Ticket URL: <https://code.djangoproject.com/ticket/23740>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.0c410d48c1f16bfb7582873712558857%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.