Merge "Fix dbmanage upgrade and downgrade"
This commit is contained in:
commit
aae7699bc5
|
@ -71,7 +71,7 @@ def add_command_parsers(subparsers):
|
|||
"Optionally, use --revision to specify an alembic revision "
|
||||
"string to upgrade to.")
|
||||
parser.set_defaults(func=DBCommand.upgrade)
|
||||
parser.add_argument('revision', nargs='?')
|
||||
parser.add_argument('--revision', nargs='?')
|
||||
|
||||
parser = subparsers.add_parser(
|
||||
'downgrade',
|
||||
|
@ -79,7 +79,7 @@ def add_command_parsers(subparsers):
|
|||
"While optional, one should generally use --revision to "
|
||||
"specify the alembic revision string to downgrade to.")
|
||||
parser.set_defaults(func=DBCommand.downgrade)
|
||||
parser.add_argument('revision', nargs='?')
|
||||
parser.add_argument('--revision', nargs='?')
|
||||
|
||||
parser = subparsers.add_parser('stamp')
|
||||
parser.add_argument('revision', nargs='?')
|
||||
|
|
|
@ -36,13 +36,13 @@ To run the offline migration between specific migration versions::
|
|||
|
||||
Upgrade the database incrementally::
|
||||
|
||||
$ watcher-db-manage --config-file /path/to/watcher.conf upgrade --delta \
|
||||
$ watcher-db-manage --config-file /path/to/watcher.conf upgrade --revision \
|
||||
<# of revs>
|
||||
|
||||
|
||||
Downgrade the database by a certain number of revisions::
|
||||
|
||||
$ watcher-db-manage --config-file /path/to/watcher.conf downgrade --delta \
|
||||
$ watcher-db-manage --config-file /path/to/watcher.conf downgrade --revision \
|
||||
<# of revs>
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue