summaryrefslogtreecommitdiff
path: root/django/core
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2013-10-30 15:17:28 +0000
committerAndrew Godwin <andrew@aeracode.org>2013-10-30 15:17:49 +0000
commite9cb333bc359a31c548c97dc07e392cfe39be18e (patch)
tree2878966b525ee54fd91494eae51aa74e4ee14f03 /django/core
parenteafe279120e7e6ebe7b6d42443366088ba1a50c8 (diff)
Auto-apply initial migrations if their tables exist already.
Diffstat (limited to 'django/core')
-rw-r--r--django/core/management/commands/migrate.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py
index 14239b1452..191bc2c39d 100644
--- a/django/core/management/commands/migrate.py
+++ b/django/core/management/commands/migrate.py
@@ -127,18 +127,24 @@ class Command(BaseCommand):
# to do at this point.
emit_post_migrate_signal(created_models, self.verbosity, self.interactive, connection.alias)
- def migration_progress_callback(self, action, migration):
+ def migration_progress_callback(self, action, migration, fake=False):
if self.verbosity >= 1:
if action == "apply_start":
self.stdout.write(" Applying %s..." % migration, ending="")
self.stdout.flush()
elif action == "apply_success":
- self.stdout.write(self.style.MIGRATE_SUCCESS(" OK"))
+ if fake:
+ self.stdout.write(self.style.MIGRATE_SUCCESS(" FAKED"))
+ else:
+ self.stdout.write(self.style.MIGRATE_SUCCESS(" OK"))
elif action == "unapply_start":
self.stdout.write(" Unapplying %s..." % migration, ending="")
self.stdout.flush()
elif action == "unapply_success":
- self.stdout.write(self.style.MIGRATE_SUCCESS(" OK"))
+ if fake:
+ self.stdout.write(self.style.MIGRATE_SUCCESS(" FAKED"))
+ else:
+ self.stdout.write(self.style.MIGRATE_SUCCESS(" OK"))
def sync_apps(self, connection, apps):
"Runs the old syncdb-style operation on a list of apps."