#27315: IntegrityError: insert or update on table violates foreign key 
constraint
on Django 1.10
-------------------------------+--------------------------------------
     Reporter:  Alex Rothberg  |                    Owner:  nobody
         Type:  Uncategorized  |                   Status:  new
    Component:  Uncategorized  |                  Version:  1.10
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Unreviewed
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  0              |                    UI/UX:  0
-------------------------------+--------------------------------------

Comment (by Alex Rothberg):

 I think the issue has something to do with the migration engine. I have
 one migration now with a series of operations. One of the earlier
 operations `CreateModel` (with the field set to `db_constraint=True`); a
 later operation (in the same migration) then sets `db_constraint=False`.
 This all works in Django 1.9 but not 1.10.

 If I modify the earlier `CreateModel` operation to set the field initially
 to `db_constraint=False`, then my tests all pass.

--
Ticket URL: <https://code.djangoproject.com/ticket/27315#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 [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/067.47f3ddd3d136b0d63a9cf26dd967fe34%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to