From 03fbd83cd9492bd0333b2924a658475d7bd5d13e Mon Sep 17 00:00:00 2001 From: hardikj Date: Tue, 17 Jul 2018 17:13:56 +0530 Subject: [PATCH] Fix rev-id parameter in mistral-db-manage Accept '--rev-id' parameter, and forward it to alembic revision command internally. Change-Id: Ib4d5a056eba792f468868b12ab011f71999713a2 Closes-Bug: #1782127 --- mistral/db/sqlalchemy/migration/cli.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mistral/db/sqlalchemy/migration/cli.py b/mistral/db/sqlalchemy/migration/cli.py index 1cec7b419..86d233b2a 100644 --- a/mistral/db/sqlalchemy/migration/cli.py +++ b/mistral/db/sqlalchemy/migration/cli.py @@ -81,7 +81,8 @@ def do_revision(config, cmd): config, cmd, message=CONF.command.message, autogenerate=CONF.command.autogenerate, - sql=CONF.command.sql + sql=CONF.command.sql, + rev_id=CONF.command.rev_id ) @@ -106,6 +107,7 @@ def add_command_parsers(subparsers): parser = subparsers.add_parser('revision') parser.add_argument('-m', '--message') + parser.add_argument('--rev-id', dest='rev_id') parser.add_argument('--autogenerate', action='store_true') parser.add_argument('--sql', action='store_true') parser.set_defaults(func=do_revision)