#31444: ForeignKey migrations without database changes shouldn't touch the 
database
----------------------------+--------------------------------------
     Reporter:  Peter Law   |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  2.2
     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 Simon Charette):

 > At least for Postgres (I've not tested elsewhere), when Django runs the
 migration it will end up dropping and re-adding the foreign key (which
 involves locking the table and having the database revalidate the
 ForeignKey) but nothing else.
 > In a production system this is at best inconvenient and at worst can
 significantly impact site performance for the duration of the migration
 (or force you to take the site offline to run the migration).

 Pretty sure this is solved in recent versions of Django, against which
 version did you reproduce?

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

Reply via email to