#32263: squashmigrations produces incorrect result when a RenameModel operation 
is
performed on a ForeignKey target
----------------------------------+------------------------------------
     Reporter:  InvalidInterrupt  |                    Owner:  nobody
         Type:  Bug               |                   Status:  new
    Component:  Migrations        |                  Version:  3.1
     Severity:  Normal            |               Resolution:
     Keywords:                    |             Triage Stage:  Accepted
    Has patch:  0                 |      Needs documentation:  0
  Needs tests:  0                 |  Patch needs improvement:  0
Easy pickings:  0                 |                    UI/UX:  0
----------------------------------+------------------------------------
Changes (by Mariusz Felisiak):

 * stage:  Unreviewed => Accepted


Comment:

 Thanks for the report. Agreed, we have two separate issues that can be
 fixed separately. I attached sample projects:

 > There are two apparent problems with the result:
 > * The model with the `ForeignKey` field is created before the target of
 the `ForeignKey`

 [https://code.djangoproject.com/raw-
 attachment/ticket/32263/ticket_32263_2.tar.gz Sample project 2]

 > * The `to` parameter of the `ForeignKey` is not updated with the new
 model name (the final `AddField` operation is not necessary to cause this
 problem)

 [https://code.djangoproject.com/raw-
 attachment/ticket/32263/ticket_32263_1.tar.gz Sample project 1]

-- 
Ticket URL: <https://code.djangoproject.com/ticket/32263#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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/074.d12634e5100f36b2fc5a1dacb7d9212d%40djangoproject.com.

Reply via email to