diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2014-07-29 10:02:59 -0700 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-07-29 10:03:59 -0700 |
| commit | 3deddc2fdf1f47a9564b6d39ee53dc5bdd944dc2 (patch) | |
| tree | 222eff91d814b9eaea9e6ef4fbfd7e795d630d39 /django | |
| parent | 0a4fbf4e13b194383f9eecc0af337a50fb6dfe98 (diff) | |
[1.7.x] Fixed #23090: Document and enforce not double-squashing migrations
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/management/commands/squashmigrations.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/django/core/management/commands/squashmigrations.py b/django/core/management/commands/squashmigrations.py index c4f9326c5d..8795947296 100644 --- a/django/core/management/commands/squashmigrations.py +++ b/django/core/management/commands/squashmigrations.py @@ -70,6 +70,8 @@ class Command(BaseCommand): # Load the operations from all those migrations and concat together operations = [] for smigration in migrations_to_squash: + if smigration.replaces: + raise CommandError("You cannot squash squashed migrations! Please transition it to a normal migration first: https://docs.djangoproject.com/en/1.7/topics/migrations/#squashing-migrations") operations.extend(smigration.operations) if self.verbosity > 0: |
