我有一個django遷移的問題。我得到這個錯誤:Django遷移依賴項引用不存在的父節點
django.db.migrations.exceptions.NodeNotFoundError: Migration user.0050_merge_20170523_1254 dependencies reference nonexistent parent node ('user', '0049_auto_20170519_1934')
我修復錯誤,刪除了一些行,但修復這一切的錯誤後,我得到其他:
ValueError: Could not find common ancestor of {'0050_merge_20170523_1254', '0007_auto_20170524_1540'}
我不能解決。我可以刪除數據庫並再次執行遷移...但在生產環境中,我想知道如何正確修復,而不需要drop數據庫哈哈。
謝謝!
您將不得不從每個遷移中「回溯」依賴項,直到樹被正確構建。 –