#25253: MySQL migrations drop & recreate constraints unnecessarily when changing
attributes that don't affect the schema
--------------------------------------+------------------------------------
     Reporter:  Thomas Recouvreux     |                    Owner:  nobody
         Type:  Cleanup/optimization  |                   Status:  new
    Component:  Migrations            |                  Version:  1.8
     Severity:  Normal                |               Resolution:
     Keywords:  migrations m2m mysql  |             Triage Stage:  Accepted
    Has patch:  0                     |      Needs documentation:  0
  Needs tests:  0                     |  Patch needs improvement:  0
Easy pickings:  0                     |                    UI/UX:  0
--------------------------------------+------------------------------------

Comment (by Cameron Dawson):

 I'm still hitting this with MySQL 5.7 and Django 1.11.3:

 {{{--
 -- Alter field job on textlogstep
 --
 ALTER TABLE `text_log_step` DROP FOREIGN KEY
 `text_log_step_job_id_698f3bfb_fk_job_id`;
 ALTER TABLE `text_log_step` ADD CONSTRAINT
 `text_log_step_job_id_698f3bfb_fk_job_id` FOREIGN KEY (`job_id`)
 REFERENCES `job` (`id`);}}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/25253#comment:10>
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/066.6369070d0ee19d74447d44227c2b8775%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to