Merge "Allow running expand & migrate at the same time"

This commit is contained in:
Jenkins 2016-11-03 23:09:44 +00:00 committed by Gerrit Code Review
commit c75f83699e
1 changed files with 6 additions and 1 deletions

View File

@ -437,7 +437,12 @@ class DbSync(BaseApp):
def main():
assert_not_extension(CONF.command.extension)
if CONF.command.expand:
# It is possible to run expand and migrate at the same time,
# expand needs to run first however.
if CONF.command.expand and CONF.command.migrate:
upgrades.expand_schema()
upgrades.migrate_data()
elif CONF.command.expand:
upgrades.expand_schema()
elif CONF.command.migrate:
upgrades.migrate_data()