Browse files

Fix bad conflict detection during makemigrations

  • Loading branch information...
1 parent 8d7e048 commit 28779abb759d5687a27011b40c0d2f34ada815e9 @andrewgodwin andrewgodwin committed Mar 8, 2014
Showing with 1 addition and 2 deletions.
  1. +1 −1 django/core/management/commands/makemigrations.py
  2. +0 −1 django/db/migrations/loader.py
View
2 django/core/management/commands/makemigrations.py
@@ -52,7 +52,7 @@ def handle(self, *app_labels, **options):
# Load the current graph state. Takes a connection, but it's not used
# (makemigrations doesn't look at the database state).
# Also make sure the graph is built without unmigrated apps shoehorned in.
- loader = MigrationLoader(connections[DEFAULT_DB_ALIAS])
+ loader = MigrationLoader(connections[DEFAULT_DB_ALIAS], load=False)
loader.build_graph(ignore_unmigrated=True)
# Before anything else, see if there's conflicting apps and drop out
View
1 django/db/migrations/loader.py
@@ -201,7 +201,6 @@ def build_graph(self, ignore_unmigrated=False):
if parent[1] == "__first__" and parent not in self.graph:
if parent[0] in self.unmigrated_apps:
if ignore_unmigrated:
- migration.dependencies.remove(parent)
parent = None
else:
# This app isn't migrated, but something depends on it.

0 comments on commit 28779ab

Please sign in to comment.