dajngo所有迁移均加倍
我刚刚启动了我的Django项目,经过迁移后,我试图创建Superuser。然后出现了我没有应用的迁移的错误(即使我只是这样做)。当我检查“展示移民”时,事实证明所有迁移都翻了一番。我已经删除了迁移文件,DB也是如此(因为它是空的)。问题尚未消失。有人知道可能是什么问题吗?
admin
[ ] 0001_initial 2
[ ] 0001_initial
[ ] 0002_logentry_remove_auto_add 2
[ ] 0002_logentry_remove_auto_add
[ ] 0003_logentry_add_action_flag_choices
[ ] 0003_logentry_add_action_flag_choices 2
auth
[ ] 0001_initial 2
[ ] 0001_initial
[ ] 0002_alter_permission_name_max_length 2
[ ] 0002_alter_permission_name_max_length
[ ] 0003_alter_user_email_max_length 2
[ ] 0003_alter_user_email_max_length
[ ] 0004_alter_user_username_opts 2
[ ] 0004_alter_user_username_opts
[ ] 0005_alter_user_last_login_null 2
[ ] 0005_alter_user_last_login_null
[ ] 0006_require_contenttypes_0002 2
[ ] 0006_require_contenttypes_0002
[ ] 0007_alter_validators_add_error_messages 2
[ ] 0007_alter_validators_add_error_messages
[ ] 0008_alter_user_username_max_length 2
[ ] 0008_alter_user_username_max_length
[ ] 0009_alter_user_last_name_max_length 2
[ ] 0009_alter_user_last_name_max_length
[ ] 0010_alter_group_name_max_length 2
[ ] 0010_alter_group_name_max_length
[ ] 0011_update_proxy_permissions 2
[ ] 0011_update_proxy_permissions
[ ] 0012_alter_user_first_name_max_length
[ ] 0012_alter_user_first_name_max_length 2
contenttypes
[ ] 0001_initial 2
[ ] 0001_initial
[ ] 0002_remove_content_type_name
[ ] 0002_remove_content_type_name 2
sessions
[ ] 0001_initial
[ ] 0001_initial 2
目前,我有Django,石墨烯和石墨烯-Django。
这是错误:
CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0001_initial 2, 0002_logentry_remove_auto_add 2, 0003_logentry_add_action_flag_choices, 0003_logentry_add_action_flag_choices 2 in admin; 0001_initial, 0001_initial 2 in sessions; 0001_initial 2, 0002_alter_permission_name_max_length 2, 0003_alter_user_email_max_length 2, 0004_alter_user_username_opts 2, 0005_alter_user_last_login_null 2, 0006_require_contenttypes_0002 2, 0007_alter_validators_add_error_messages 2, 0008_alter_user_username_max_length 2, 0009_alter_user_last_name_max_length 2, 0010_alter_group_name_max_length 2, 0011_update_proxy_permissions 2, 0012_alter_user_first_name_max_length, 0012_alter_user_first_name_max_length 2 in auth; 0001_initial 2, 0002_remove_content_type_name, 0002_remove_content_type_name 2 in contenttypes).
To fix them run 'python manage.py makemigrations --merge'
如果有人想到如何解决这个问题,我将非常感谢您的帮助!
I just started my django project and after running the migrations I was trying to create superuser. Then the error popped out that I have unapplied migrations (even though I just did it). When I checked the "showmigrations" it turned out that all the migrations are doubled. I have deleted migration file so does the db (because it was empty anyway). The problem has not disappeared. Does anyone know what may be the problem?
admin
[ ] 0001_initial 2
[ ] 0001_initial
[ ] 0002_logentry_remove_auto_add 2
[ ] 0002_logentry_remove_auto_add
[ ] 0003_logentry_add_action_flag_choices
[ ] 0003_logentry_add_action_flag_choices 2
auth
[ ] 0001_initial 2
[ ] 0001_initial
[ ] 0002_alter_permission_name_max_length 2
[ ] 0002_alter_permission_name_max_length
[ ] 0003_alter_user_email_max_length 2
[ ] 0003_alter_user_email_max_length
[ ] 0004_alter_user_username_opts 2
[ ] 0004_alter_user_username_opts
[ ] 0005_alter_user_last_login_null 2
[ ] 0005_alter_user_last_login_null
[ ] 0006_require_contenttypes_0002 2
[ ] 0006_require_contenttypes_0002
[ ] 0007_alter_validators_add_error_messages 2
[ ] 0007_alter_validators_add_error_messages
[ ] 0008_alter_user_username_max_length 2
[ ] 0008_alter_user_username_max_length
[ ] 0009_alter_user_last_name_max_length 2
[ ] 0009_alter_user_last_name_max_length
[ ] 0010_alter_group_name_max_length 2
[ ] 0010_alter_group_name_max_length
[ ] 0011_update_proxy_permissions 2
[ ] 0011_update_proxy_permissions
[ ] 0012_alter_user_first_name_max_length
[ ] 0012_alter_user_first_name_max_length 2
contenttypes
[ ] 0001_initial 2
[ ] 0001_initial
[ ] 0002_remove_content_type_name
[ ] 0002_remove_content_type_name 2
sessions
[ ] 0001_initial
[ ] 0001_initial 2
In my venv for now I have django, graphene and graphene-django.
This is the error:
CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0001_initial 2, 0002_logentry_remove_auto_add 2, 0003_logentry_add_action_flag_choices, 0003_logentry_add_action_flag_choices 2 in admin; 0001_initial, 0001_initial 2 in sessions; 0001_initial 2, 0002_alter_permission_name_max_length 2, 0003_alter_user_email_max_length 2, 0004_alter_user_username_opts 2, 0005_alter_user_last_login_null 2, 0006_require_contenttypes_0002 2, 0007_alter_validators_add_error_messages 2, 0008_alter_user_username_max_length 2, 0009_alter_user_last_name_max_length 2, 0010_alter_group_name_max_length 2, 0011_update_proxy_permissions 2, 0012_alter_user_first_name_max_length, 0012_alter_user_first_name_max_length 2 in auth; 0001_initial 2, 0002_remove_content_type_name, 0002_remove_content_type_name 2 in contenttypes).
To fix them run 'python manage.py makemigrations --merge'
If anyone has the idea how to solve this I would really appreciate the help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论