Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix migrate_manual command for Django 1.10 #1016

Merged
merged 1 commit into from Jan 11, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions temba/utils/management/commands/migrate_manual.py
Expand Up @@ -66,7 +66,7 @@ def handle(self, app_label, migration_name, *args, **options):
if record and not plan:
raise CommandError("Migration %s has already been applied" % migration)

emit_pre_migrate_signal([], self.verbosity, interactive, connection.alias)
emit_pre_migrate_signal(self.verbosity, interactive, connection.alias)

self.stdout.write(self.style.MIGRATE_HEADING("Operations to perform:"))
self.stdout.write(" Manually apply migration %s" % migration)
Expand All @@ -80,7 +80,7 @@ def handle(self, app_label, migration_name, *args, **options):
self.record_migration(migration, executor)

# send the post_migrate signal, so individual apps can do whatever they need to do at this point.
emit_post_migrate_signal([], self.verbosity, interactive, connection.alias)
emit_post_migrate_signal(self.verbosity, interactive, connection.alias)

def apply_migration(self, migration, apply_function):
compute_time = self.verbosity > 1
Expand All @@ -94,12 +94,12 @@ def apply_migration(self, migration, apply_function):

elapsed = " (%.3fs)" % (time.time() - start) if compute_time else ""

self.stdout.write(self.style.MIGRATE_SUCCESS("OK" + elapsed))
self.stdout.write(self.style.SUCCESS("OK" + elapsed))

def record_migration(self, migration, executor):
self.stdout.write(" Recording %s... " % migration, ending="")
self.stdout.flush()

executor.recorder.record_applied(migration.app_label, migration.name)

self.stdout.write(self.style.MIGRATE_SUCCESS("DONE"))
self.stdout.write(self.style.SUCCESS("DONE"))