Now when I've made changes to unique_together constraint, I got migration
failure:
{{{
ValueError: Found wrong number (0) of constraints for
trans_check(contentsum, project_id, language_id, check)
}}}
This seems to be caused by the constraing being created in different order
in past. I think it has been created by South, but I'm not 100% sure. But
anyway I've ended up with half applied migration what is not really a
pleasant state.
I've fixed this for me by comparing fields as set not as lists (see
attached patch), what is certainly okay for unique constraints, but is
probably bad idea for general indexes.
--
Ticket URL: <https://code.djangoproject.com/ticket/27826>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "columns-ordering.patch" added.
workaround patch
* status: new => closed
* resolution: => duplicate
Comment:
This looks like a duplicate of #23906. The conclusion there is that you
must fix your database. Django ignoring the order of columns in an index
isn't correct.
--
Ticket URL: <https://code.djangoproject.com/ticket/27826#comment:1>
Comment (by Michal Čihař):
Okay, the thing is that the database has been created by Django this
way...
--
Ticket URL: <https://code.djangoproject.com/ticket/27826#comment:2>