Gui*_* IA 1 migration django dependencies not-exists ancestor
我有django迁移的问题.我收到此错误:
django.db.migrations.exceptions.NodeNotFoundError: Migration user.0050_merge_20170523_1254 dependencies reference nonexistent parent node ('user', '0049_auto_20170519_1934')
Run Code Online (Sandbox Code Playgroud)
我修复错误,删除一些行,但在修复所有这些错误后,我得到其他:
ValueError: Could not find common ancestor of {'0050_merge_20170523_1254', '0007_auto_20170524_1540'}
Run Code Online (Sandbox Code Playgroud)
我无法解决这个问题.我可以删除数据库并再次makemigrations ...但在生产环境中我想知道如何正确修复,没有drop database哈哈.
谢谢!
下次回滚时:
./manage.py migrate yourAppName 0012这只是示例号)并按Enter键不要只是删除迁移!希望有所帮助.