dependencies reference nonexistent parent node error in Django

我的未来我决定 提交于 2019-12-11 06:46:38

问题


So, I am learning Django using Django By Example book. I moved to a new chapter where I needed to make a new project and app. This is what I did.

djnago-admin startproject myshop

cd to myshop directory

django-admin startapp shop
python manage.py migrate 

I am unable to migrate with the follwing error.

 django.db.migrations.exceptions.NodeNotFoundError: Migration django.db.migrations.exceptions.NodeNotFoundError: Migration auth.0009_user_following dependencies reference nonexistent parent node (u'account', u'0002_contact')

I did make Contact model in account app in my last project. How is the new project related to the old one?

Please help me resolve this problem. Thanks.


回答1:


It means that you don't have the file 0002_contact in your account app's migration folder. You need to recover the file or configure this file 0009_user_following and remove the (u'account', u'0002_contact') line



来源:https://stackoverflow.com/questions/43829797/dependencies-reference-nonexistent-parent-node-error-in-django

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!