本文主要是介绍迁移数据库出错 CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
Ⅰ 报错信息
CommandError: Conflicting migrations detected
CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0002_logentry_user, 0003_logentry_add_action_flag_choices in admin).
To fix them run 'python manage.py makemigrations --merge'
Ⅱ 解决方案
按照报错信息指示的出现错误无的迁移文件删除migrations下面的迁移文件
重新tools——run manage.py task——makemigrations
migrate
只要涉及删除一个迁移文件就需要删除目录下除了_init_.py的其他迁移文件,不然就会报错
这是迁移成功图
这篇关于迁移数据库出错 CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!