commands: make migrate print tenant names in default verbosity level (#48087)

This commit is contained in:
Frédéric Péters 2020-11-15 14:41:35 +01:00
parent 2f56c66c78
commit 09a0f57883
1 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,7 @@ from wcs.qommon.publisher import get_publisher_class
class Command(BaseCommand):
help = 'Migrate databases'
def handle(self, **options):
def handle(self, verbosity=1, **options):
Publisher = get_publisher_class()
quixote.cleanup()
pub = Publisher.create_publisher()
@ -37,6 +37,8 @@ class Command(BaseCommand):
pub.app_dir = tenant_path
pub.set_config()
if pub.is_using_postgresql():
if verbosity:
print('Running migrations for', hostname)
pub.migrate_sql()
pub.cleanup()
quixote.cleanup()