#25817: Unable to rename a field reference in foreign key 'to_field'
---------------------------------+------------------------------------
     Reporter:  snopoke          |                    Owner:  nobody
         Type:  Bug              |                   Status:  new
    Component:  Migrations       |                  Version:  master
     Severity:  Normal           |               Resolution:
     Keywords:  to_field rename  |             Triage Stage:  Accepted
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+------------------------------------
Changes (by charettes):

 * version:  1.7 => master
 * stage:  Unreviewed => Accepted


Comment:

 The list of operations generated should look like:

 1. Alter the field Bazz.bar type to an IntegerField in order to drop the
 FK constraint.
 2. Perform the Bar.bar_id rename to external_id;
 3. Alter back the field Bazz.bar to a FK referring to Bar.external_id;

 @snopoke, can you confirm these operations work?

--
Ticket URL: <https://code.djangoproject.com/ticket/25817#comment:3>
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/065.b101e80de7f5a5764062370aeff7f1f5%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to