#23906: "ValueError: Found wrong number (0) of constraints" when migrating
backwards with from alter_unique_together migration.
-------------------------------------+-------------------------------------
     Reporter:  liavkoren            |                    Owner:  nobody
         Type:  Bug                  |                   Status:  closed
    Component:  Migrations           |                  Version:  1.7
     Severity:  Normal               |               Resolution:  invalid
     Keywords:                       |             Triage Stage:
  alter_unique_together migrations   |  Unreviewed
  constraints valueError             |      Needs documentation:  0
    Has patch:  0                    |  Patch needs improvement:  0
  Needs tests:  0                    |                    UI/UX:  0
Easy pickings:  0                    |
-------------------------------------+-------------------------------------
Changes (by MarkusH):

 * cc: info+coding@… (added)
 * status:  new => closed
 * resolution:   => invalid


Comment:

 As far as I know the order of the items in the too_together lists does
 matter, at least on MySQL a unique constraint on a,b is different to b,a
 (or at least was for a very long time). That being said, your "fix" is
 wrong and, as Carl already said, your database just doesn't have the same
 state as your models represent.

--
Ticket URL: <https://code.djangoproject.com/ticket/23906#comment:2>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.f4f21403ac8421cae4f3e3fc7beb2576%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to