Django NodeNotFoundError during migration

别说谁变了你拦得住时间么 提交于 2019-12-04 23:46:43

your migration has a dependency on a migration in another app () which apparently doesn't exist. if you've removed or moved/consolidation migrations in the 'auth' app, this is possibly why. if you remove the offending migration from this migration, just make sure changes from the '0007' migration in the auth package (check your source code revision history) have already been applied to your current database and you should be fine to continue without that explicit migration. i would also consider checking if any other apps in your project depend on those missing migrations from 'auth'. cheers.

(u'auth', u'0007_alter_validators_add_error_messages')

It worked for me with pip install --upgrade django

I got the same error on installing a new package which also downgraded my Django to version 1.8.16

pip install --upgrade django installed back the 1.10.3 version (on which I had been working ever since I started with my project) and that solved the problem.

Your error indicates that tasks application has a migration that can't be found.

That's mean, that you are missing some applications in INSTALLED_APPS - most probably you do not have 'django.contrib.auth' in this list.

First I would suggest you to upgrade your django

pip install --upgrade django

If this doesn't help you then try the following:

  • Remove the new changes from the modals and run -- python manage.py migrate --fake
  • Now again modify your models with new changes and Run -- python manage.py makemigrations
  • And then again run -- python manage.py migrate
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!