django迁移数据库错误

django.db.migrations.graph.NodeNotFoundError: Migration order.0002_auto_20181209_0031 dependencies reference nonexistent parent node ('user', '0001_initial')

  删除所有的pyc文件,迁移文件 然后重新运行

python manage.py makemigrations

  django.db.utils.InternalError: (1060, "Duplicate column name 'addr_id'")

运行

python manage.py migrate --fake

 然后重新运行

python manage.py migrate

  成功!

原文地址:https://www.cnblogs.com/huxiaoyi/p/10090820.html