From db4527e3c0486c46356e3d625931369e8b3bec19 Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Wed, 27 Nov 2013 12:29:22 +0000 Subject: [PATCH] Fix squashed migration loading ordering issue --- django/db/migrations/loader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py index 16557074a1b..598c582fa04 100644 --- a/django/db/migrations/loader.py +++ b/django/db/migrations/loader.py @@ -171,6 +171,8 @@ class MigrationLoader(object): # the usage pattern here is to delete things after a while. del normal[replaced] for child_key in reverse_dependencies.get(replaced, set()): + if child_key in migration.replaces: + continue normal[child_key].dependencies.remove(replaced) normal[child_key].dependencies.append(key) normal[key] = migration