#22605: Impossible to delete two models with a M2M field
---------------------------------+--------------------------------------
Reporter: andrewgodwin | Owner: andrewsg
Type: Bug | Status: assigned
Component: Migrations | Version: 1.7-beta-2
Severity: Release blocker | 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 andrewsg):
andrewgodwin: this commit:
https://github.com/andrewsg/django/commit/ccb3843d482d0e9019f5dc9ffab06130fd1eb8fb
is the current state of my branch, which is an unhappy place between a
working and inefficient prototype (delete all models with no
entanglements; delete ALL fields with references from those models; delete
all remaining models) and my goal, which was for the autodetector to work
out the strategy with the fewest migrations and operations.
I stopped work when I realized that I really needed the delete models step
to be two-phase like you mentioned, and figure out how to do the actual
work intelligently. The strategy my code followed initially, mimicking
the create model code, was too "greedy". Generalizing this so the
autodetector does all of the work like this, so the add model and remove
model special cases can be unified, sounds like a great idea. Please feel
free to take over the ticket.
--
Ticket URL: <https://code.djangoproject.com/ticket/22605#comment:8>
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/070.05035dc3fc75eda0e7a409850ce82f0c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.