#27746: Database migration fail when removing a child model containing only
foreignkeys in a multi-table inheritance context on MySQL
-------------------------------+------------------------------------
     Reporter:  David CHANIAL  |                    Owner:  nobody
         Type:  Bug            |                   Status:  new
    Component:  Migrations     |                  Version:  master
     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
-------------------------------+------------------------------------

Comment (by Simon Charette):

 Replying to [comment:3 Tim Graham]:
 > I thought the conclusion of ticket:24424#comment:11 was that it's also
 an issue with the autodetector.

 Indeed but the only way we'll be able to solve #24424 is by teaching the
 auto-detector to either issue an `AlterField` or a combination of
 equivalent operations instead of a `RemoveField` + `AddField` in order to
 convert the `id` auto-incrementing field primay key to integer foreign key
 primary key.

 There's a side discussion about the issue encountered here from comments
 19 to 22 on #24424. I believe the solution here would be to teach field
 operations to optimize the `[FieldOperation('model', 'field'),
 RemoveModel('model')]` case to `[RemoveModel("model')]`.

--
Ticket URL: <https://code.djangoproject.com/ticket/27746#comment:4>
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/064.4780ab4c9408841acd4c68b41e4d7a92%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to