summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-10-29 07:36:21 -0400
committerTim Graham <timograham@gmail.com>2015-10-29 07:37:47 -0400
commit9e7d0d90cc35800cd309d4e0296523220864e884 (patch)
treefb693aa018368219bc0c853cd026155ce2352d85
parent44f177b5cdab82ffefa81abd3e9c2a13aaab256f (diff)
[1.9.x] Fixed #25627, refs #25618 -- Removed detection of south migrations in loader.
Backport of c4af8eb366be45420e13a400cc1dcc8fab91c1ad from master
-rw-r--r--django/db/migrations/loader.py22
1 files changed, 1 insertions, 21 deletions
diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
index b19c487e9f..310a4d01b4 100644
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -101,36 +101,16 @@ class MigrationLoader(object):
if import_name[0] not in "_.~":
migration_names.add(import_name)
# Load them
- south_style_migrations = False
for migration_name in migration_names:
- try:
- 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():
- south_style_migrations = True
- break
- raise
+ migration_module = import_module("%s.%s" % (module_name, migration_name))
if not hasattr(migration_module, "Migration"):
raise BadMigrationError(
"Migration %s in app %s has no Migration class" % (migration_name, app_config.label)
)
- # Ignore South-style migrations
- if hasattr(migration_module.Migration, "forwards"):
- south_style_migrations = True
- break
self.disk_migrations[app_config.label, migration_name] = migration_module.Migration(
migration_name,
app_config.label,
)
- if south_style_migrations:
- if app_config.label in self.migrated_apps:
- raise BadMigrationError(
- "Migrated app %r contains South migrations. Make sure "
- "all numbered South migrations are deleted prior to "
- "creating Django migrations." % app_config.label
- )
- self.unmigrated_apps.add(app_config.label)
def get_migration(self, app_label, name_prefix):
"Gets the migration exactly named, or raises `graph.NodeNotFoundError`"