瀏覽代碼

Fixed #25047 -- Improved "Conflicting migrations" error message.

Tim Graham 9 年之前
父節點
當前提交
45ed19de68
共有 2 個文件被更改,包括 4 次插入2 次删除
  1. 2 1
      django/core/management/commands/makemigrations.py
  2. 2 1
      django/core/management/commands/migrate.py

+ 2 - 1
django/core/management/commands/makemigrations.py

@@ -80,7 +80,8 @@ class Command(BaseCommand):
                 for app, names in conflicts.items()
             )
             raise CommandError(
-                "Conflicting migrations detected (%s).\nTo fix them run "
+                "Conflicting migrations detected; multiple leaf nodes in the "
+                "migration graph: (%s).\nTo fix them run "
                 "'python manage.py makemigrations --merge'" % name_str
             )
 

+ 2 - 1
django/core/management/commands/migrate.py

@@ -94,7 +94,8 @@ class Command(BaseCommand):
                 for app, names in conflicts.items()
             )
             raise CommandError(
-                "Conflicting migrations detected (%s).\nTo fix them run "
+                "Conflicting migrations detected; multiple leaf nodes in the "
+                "migration graph: (%s).\nTo fix them run "
                 "'python manage.py makemigrations --merge'" % name_str
             )