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

  成功!


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM