#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):
It looks like this can't be done at the optimizer level as not all
`RemoveField` operations can be fold into `DeleteModel` ones. For example,
the `RemoveField` operations removing many-to-many fields cannot be
optimized (as the schema editor's `delete_model` function doesn't deal
with intermediary table deletions) but there's no way to figure out
whether or not a `RemoveField` operation removes a many-to-many field or
not.
I believe the method that requires adjustments is the
`MigrationAutodetector.generate_deleted_models()` one.
--
Ticket URL: <https://code.djangoproject.com/ticket/27746#comment:5>
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/064.28e3e6c6216baba58b663730d81f0d33%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.