Commit 8c8a6d8a authored by David Filipovic's avatar David Filipovic Committed by Tim Graham
Browse files

[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.
parent f787aaeb
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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 "
+3 −0
Original line number Diff line number Diff line
@@ -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`).