diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2014-04-30 12:25:12 -0700 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-04-30 12:26:11 -0700 |
| commit | 35c2a14a49ac3cb25dcff818b280bf0b4c290287 (patch) | |
| tree | 38db27a3058ccd3a1db9a77c7ddec9b23968877c /django/db/migrations/executor.py | |
| parent | a6ecd5dbb34249f756a337c359eef1e8d78dc01e (diff) | |
[1.7.x] Fixed #22485: Include all unmigrated apps in project state by default.
Diffstat (limited to 'django/db/migrations/executor.py')
| -rw-r--r-- | django/db/migrations/executor.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/db/migrations/executor.py b/django/db/migrations/executor.py index 1a7832b76f..147aa550ae 100644 --- a/django/db/migrations/executor.py +++ b/django/db/migrations/executor.py @@ -69,7 +69,7 @@ class MigrationExecutor(object): statements = [] for migration, backwards in plan: with self.connection.schema_editor(collect_sql=True) as schema_editor: - project_state = self.loader.graph.project_state((migration.app_label, migration.name), at_end=False) + project_state = self.loader.project_state((migration.app_label, migration.name), at_end=False) if not backwards: migration.apply(project_state, schema_editor, collect_sql=True) else: @@ -90,7 +90,7 @@ class MigrationExecutor(object): else: # Alright, do it normally with self.connection.schema_editor() as schema_editor: - project_state = self.loader.graph.project_state((migration.app_label, migration.name), at_end=False) + project_state = self.loader.project_state((migration.app_label, migration.name), at_end=False) migration.apply(project_state, schema_editor) # For replacement migrations, record individual statuses if migration.replaces: @@ -110,7 +110,7 @@ class MigrationExecutor(object): self.progress_callback("unapply_start", migration, fake) if not fake: with self.connection.schema_editor() as schema_editor: - project_state = self.loader.graph.project_state((migration.app_label, migration.name), at_end=False) + project_state = self.loader.project_state((migration.app_label, migration.name), at_end=False) migration.unapply(project_state, schema_editor) # For replacement migrations, record individual statuses if migration.replaces: @@ -128,7 +128,7 @@ class MigrationExecutor(object): tables it would create exist. This is intended only for use on initial migrations (as it only looks for CreateModel). """ - project_state = self.loader.graph.project_state((migration.app_label, migration.name), at_end=True) + project_state = self.loader.project_state((migration.app_label, migration.name), at_end=True) apps = project_state.render() for operation in migration.operations: if isinstance(operation, migrations.CreateModel): |
