#24303: Not all models available in custom data migration
---------------------------------+--------------------------------------
     Reporter:  grandfatha       |                    Owner:  nobody
         Type:  Bug              |                   Status:  closed
    Component:  Migrations       |                  Version:  1.7
     Severity:  Normal           |               Resolution:  worksforme
     Keywords:  data migrations  |             Triage Stage:  Unreviewed
    Has patch:  0                |      Needs documentation:  0
  Needs tests:  0                |  Patch needs improvement:  0
Easy pickings:  0                |                    UI/UX:  0
---------------------------------+--------------------------------------

Comment (by grandfatha):

 When trying this within my app, I got:

   File ".../site-packages/django/db/migrations/graph.py", line 46, in
 add_dependency
     "Migration %s dependencies reference nonexistent parent node %r" %
 (migration, parent)
 KeyError: u"Migration items.0006_auto_20150212_1138 dependencies reference
 nonexistent parent node (u'attributes', u'0001_initial.py')"


 I changed it to:

 {{{

 class Migration(migrations.Migration):

     dependencies = [
         ('items', '0005_probe_is_active'),
         ('attributes', '__first__'),
         ('actions', '__first__'),
     ]

     operations = [
        migrations.RunPython(code=forwards)
     ]

 }}}

 Then it worked.

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

Reply via email to