diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2014-06-22 13:03:25 -0700 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2014-06-22 13:03:25 -0700 |
| commit | ecc06d44ed67c5bd27278244e5cf315d6fa2c893 (patch) | |
| tree | 97db0e0d86e811f174c67018142d7d35cc428895 | |
| parent | 8b878c7a6429be499edca5cb6897c226f5bdcba2 (diff) | |
Clean up syncdb parts of migrate output if no synced apps
| -rw-r--r-- | django/core/management/commands/migrate.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/django/core/management/commands/migrate.py b/django/core/management/commands/migrate.py index 508dd8e0d9..16a07bcfcd 100644 --- a/django/core/management/commands/migrate.py +++ b/django/core/management/commands/migrate.py @@ -108,8 +108,8 @@ class Command(BaseCommand): # Print some useful info if self.verbosity >= 1: self.stdout.write(self.style.MIGRATE_HEADING("Operations to perform:")) - if run_syncdb: - self.stdout.write(self.style.MIGRATE_LABEL(" Synchronize unmigrated apps: ") + (", ".join(executor.loader.unmigrated_apps) or "(none)")) + if run_syncdb and executor.loader.unmigrated_apps: + self.stdout.write(self.style.MIGRATE_LABEL(" Synchronize unmigrated apps: ") + (", ".join(executor.loader.unmigrated_apps))) if target_app_labels_only: self.stdout.write(self.style.MIGRATE_LABEL(" Apply all migrations: ") + (", ".join(set(a for a, n in targets)) or "(none)")) else: @@ -122,7 +122,7 @@ class Command(BaseCommand): # If you ever manage to get rid of this, I owe you many, many drinks. # Note that pre_migrate is called from inside here, as it needs # the list of models about to be installed. - if run_syncdb: + if run_syncdb and executor.loader.unmigrated_apps: if self.verbosity >= 1: self.stdout.write(self.style.MIGRATE_HEADING("Synchronizing apps without migrations:")) created_models = self.sync_apps(connection, executor.loader.unmigrated_apps) |
