summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/db/migrations/loader.py5
-rw-r--r--docs/releases/1.8.7.txt3
2 files changed, 7 insertions, 1 deletions
diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
index 35266a7f62..bbd60a63dd 100644
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -97,6 +97,7 @@ class MigrationLoader(object):
migration_names.add(import_name)
# Load them
south_style_migrations = False
+ django_style_migrations = False
for migration_name in migration_names:
try:
migration_module = import_module("%s.%s" % (module_name, migration_name))
@@ -115,8 +116,10 @@ class MigrationLoader(object):
south_style_migrations = True
break
self.disk_migrations[app_config.label, migration_name] = migration_module.Migration(migration_name, app_config.label)
+ django_style_migrations = True
+
if south_style_migrations:
- if app_config.label in self.migrated_apps:
+ if django_style_migrations:
raise BadMigrationError(
"Migrated app %r contains South migrations. Make sure "
"all numbered South migrations are deleted prior to "
diff --git a/docs/releases/1.8.7.txt b/docs/releases/1.8.7.txt
index 9e8f37f120..78912d0f52 100644
--- a/docs/releases/1.8.7.txt
+++ b/docs/releases/1.8.7.txt
@@ -18,3 +18,6 @@ Bugfixes
* Fixed a regression in 1.8.6 by restoring the ability to use ``Manager``
objects for the ``queryset`` argument of ``ModelChoiceField``
(:ticket:`25683`).
+
+* Fixed a regression in 1.8.6 that caused an application with South migrations
+ in the ``migrations`` directory to fail (:ticket:`25618`).