Skip to content
Browse files

Handle Apps with South migrations as unmigrated apps.

  • Loading branch information...
1 parent 975415a commit ed8919cbcb83302ea71572f5c7d5e6796bb21afa @apollo13 apollo13 committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 django/db/migrations/
9 django/db/migrations/
@@ -81,20 +81,25 @@ def load_disk(self):
if import_name[0] not in "_.~":
# Load them
+ south_style_migrations = False
for migration_name in migration_names:
migration_module = import_module("%s.%s" % (module_name, migration_name))
except ImportError as e:
# Ignore South import errors, as we're triggering them
if "south" in str(e).lower():
- continue
+ south_style_migrations = True
+ break
if not hasattr(migration_module, "Migration"):
raise BadMigrationError("Migration %s in app %s has no Migration class" % (migration_name, app_label))
# Ignore South-style migrations
if hasattr(migration_module.Migration, "forwards"):
- continue
+ south_style_migrations = True
+ break
self.disk_migrations[app_label, migration_name] = migration_module.Migration(migration_name, app_label)
+ if south_style_migrations:
+ self.unmigrated_apps.add(app_label)
def get_migration_by_prefix(self, app_label, name_prefix):
"Returns the migration(s) which match the given app label and name _prefix_"

0 comments on commit ed8919c

Please sign in to comment.
Something went wrong with that request. Please try again.