summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2015-10-27 14:20:06 -0400
committerTim Graham <timograham@gmail.com>2015-10-28 10:19:35 -0400
commit774a893d0bf3433571a94cd27883fab61010440a (patch)
tree9785e83802c3143005ac6074f73a44a66fa364d8
parentb49716cd99df26db27f3c73d9c2eee798167bf8b (diff)
[1.9.x] Fixed #25618 -- Added a helpful error message when Django & south migrations exist in the same directory.
Forwardport of 65bff161ffab1310719bdee495d1e9b35f838c31 from stable/1.8.x
-rw-r--r--django/db/migrations/loader.py6
-rw-r--r--docs/releases/1.8.6.txt3
2 files changed, 9 insertions, 0 deletions
diff --git a/django/db/migrations/loader.py b/django/db/migrations/loader.py
index fac33c3ce7..b19c487e9f 100644
--- a/django/db/migrations/loader.py
+++ b/django/db/migrations/loader.py
@@ -124,6 +124,12 @@ class MigrationLoader(object):
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):
diff --git a/docs/releases/1.8.6.txt b/docs/releases/1.8.6.txt
index 75bd79542b..76eb32902d 100644
--- a/docs/releases/1.8.6.txt
+++ b/docs/releases/1.8.6.txt
@@ -41,3 +41,6 @@ Bugfixes
* Fixed crash with ``contrib.postgres.forms.SplitArrayField`` and
``IntegerField`` on invalid value (:ticket:`25597`).
+
+* Added a helpful error message when Django and South migrations exist in the
+ same directory (:ticket:`25618`).