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