I am getting this error on migrate.
django.db.migrations.exceptions.NodeNotFoundError: Migration basket.0002_auto_20140827_1705 dependencies reference nonexistent parent node (u'partner', u'0001_initial')
I have two subapps - one myoscar, the other mysub. In mysub folder, my migration folder doesn't even have a basket.0002_auto_20140827_1705
.
In myoscar folder, there isn't a migration folder. What would cause this error? I tried creating a basket folder under oscar to see if there is migration folder popping up, nothing.
[update]
INSTALLED_APP = [...]
+get_core_apps(['myoscar.partner' ])
#also tried adding 'myoscar.basket', also tried rearranging the order
also tried forking the basket, found basket.0002_auto_20140827_1705
, commented out (u'partner', u'0001_initial')
to see what happens. Same error.
[edit] myapp is really myoscar. made corrections above
path
App
|--app
|----__init.py__
|----settings.py
|----urls.py
|--myoscar
|----basket #just forked this
|-------migrations #has 0002_auto_20140827_1705, removed error line. Shows same error.
|----dashboard
|----partner
|----myoscar
|----templates
|--mysub
|----migrations
|----static
|----templates
答案 0 :(得分:0)
我被迫删除所有 pycache 和迁移文件夹。这是一个hack,我不确定这是解决此问题的正确方法。但这有效。 删除这些文件夹后,请显式迁移每个应用程序的makemigrations。