#22397: Issues removing M2M field with explicit through model
---------------------------------+------------------------------------
Reporter: melinath | Owner: andrewsg
Type: Bug | Status: closed
Component: Migrations | Version: master
Severity: Release blocker | Resolution: fixed
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 <charette.s@…>):
In [changeset:"bc5d568e1e5c8f109bc83c1cdd943de60b66f763"]:
{{{
#!CommitTicketReference repository=""
revision="bc5d568e1e5c8f109bc83c1cdd943de60b66f763"
[1.7.x] Fixed #22397 -- Issues removing M2M field with explicit through
model
Changed the migration autodetector to remove models last so that FK
and M2M fields will not be left as dangling references. Added a check
in the migration state renderer to error out in the presence of
dangling references instead of leaving them as strings. Fixed a bug
in the sqlite backend to handle the deletion of M2M fields with
"through" models properly (i.e., do nothing successfully).
Thanks to melinath for report, loic for tests and andrewgodwin and
charettes for assistance with architecture.
Backport of 956bd64424 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22397#comment:16>
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.223056f530f2025b6413195dbdf98fe9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.