記錄替換django的user模型出現的異常InconsistentMigrationHistory

django.db.migrations.exceptions.InconsistentMigrationHistory: Migration admin.0001_initial is applied before its dependency users.0001_initial on database 'default'

解決方案:

刪除數據庫中 除了auth_user的其他表,然後重新來一次

大概原因是因爲admin的模型依賴了之前默認的user模型吧

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章