#22874: Swappable dependency breaks if swappable model not in first migration of
its app
----------------------------+--------------------------------------
     Reporter:  melinath    |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.7-beta-2
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Unreviewed
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+--------------------------------------

Comment (by melinath):

 It seems like this wasn't working because swappable dependency
 automatically goes to the first migration in the swapped model's app - and
 if the swappable model isn't migrated into existence in the first
 migration, the swappable model dependency breaks.

 I don't think this would be a serious problem in the future - brambling
 has some slightly older 1.7 migrations, from back when it would generate a
 million of them. I believe it's now consolidated down to one initial
 migration, so most people probably won't run into this.

 Workaround was to add a dependency to the last migration in the swappable
 model's app. Would that work for the swappable model dependency behavior?
 (I could also imagine situations where a swappable model is switched out
 for a different one over the course of the app.)

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

Reply via email to