diff options
| author | David Filipovic <david.filipovic@gmail.com> | 2015-11-04 17:25:21 -0500 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2015-11-10 10:34:25 -0500 |
| commit | 8c8a6d8a3f869ecc4d72b96ddb4760a1b59d5e62 (patch) | |
| tree | 2e50a1eddc22ac4e8f3a63c5c8cb7834dae27441 | |
| parent | f787aaeb262b72b9a7144d2420a2dc82c9d6e033 (diff) | |
[1.8.x] Fixed #25618 -- Restored migration support for non-upgraded apps.
A non-upgraded app is one that retains South migrations in the
`migrations` module and doesn't introduce Django migrations.
| -rw-r--r-- | django/db/migrations/loader.py | 5 | ||||
| -rw-r--r-- | docs/releases/1.8.7.txt | 3 |
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`). |
