#22397: Issues removing M2M field with explicit through model
---------------------------------+------------------------------------
     Reporter:  melinath         |                    Owner:  andrewsg
         Type:  Bug              |                   Status:  assigned
    Component:  Migrations       |                  Version:  master
     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):

 Replying to [comment:6 melinath]:
 > So to clarify, you'll make sure that the M2M fields get removed first,
 not that the migration fails to compute?

 I talked to Andrew Godwin about this today and we settled on a solution
 that boils down to that, yes.  A migration that removes the model before
 the field should fail -- it should fail for a better and clearer reason
 than KeyError or AttributeError but it should fail.  (This also applies to
 removing at able pointed to by a foreign key).  makemigrations should be
 aware of this and do the right thing.

 The functional changes are doneish; I'm working on regression tests now.

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

Reply via email to