问题
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