Merge "rename and fix the db_wipe command"
This commit is contained in:
commit
8a443dab5b
@ -212,7 +212,7 @@ Prepare database
|
||||
----------------
|
||||
* Initialize the database::
|
||||
|
||||
# trove-manage --config-file=<PathToTroveConf> db_wipe trove_test.sqlite mysql fake
|
||||
# trove-manage --config-file=<PathToTroveConf> db_recreate trove_test.sqlite mysql fake
|
||||
|
||||
* Setup trove to use the uploaded image. Enter the following in a single line, note quotes (') and backquotes(`)::
|
||||
|
||||
|
@ -10,7 +10,7 @@ function run() {
|
||||
.tox/py26/bin/python $@
|
||||
}
|
||||
run bin/trove-manage \
|
||||
--config-file=etc/trove/trove.conf.test db_wipe \
|
||||
--config-file=etc/trove/trove.conf.test db_recreate \
|
||||
trove_test.sqlite mysql fake
|
||||
run bin/trove-fake-mode \
|
||||
--fork --config-file=etc/trove/trove.conf.test \
|
||||
|
@ -77,10 +77,10 @@ class Commands(object):
|
||||
except exception.DatastoreNotFound as e:
|
||||
print(e)
|
||||
|
||||
def db_wipe(self, repo_path):
|
||||
def db_recreate(self, repo_path):
|
||||
"""Drops the database and recreates it."""
|
||||
self.db_api.drop_db(CONF)
|
||||
self.db_sync()
|
||||
self.db_sync(repo_path)
|
||||
|
||||
def params_of(self, command_name):
|
||||
if Commands.has(command_name):
|
||||
@ -113,7 +113,11 @@ def main():
|
||||
parser.add_argument('packages')
|
||||
parser.add_argument('active')
|
||||
|
||||
parser = subparser.add_parser('db_wipe')
|
||||
parser = subparser.add_parser(
|
||||
'db_recreate', description='Drop the database and recreate it')
|
||||
parser.add_argument(
|
||||
'--repo_path', help='SQLAlchemy Migrate repository path')
|
||||
parser = subparser.add_parser('db_recreate')
|
||||
parser.add_argument('repo_path')
|
||||
|
||||
cfg.custom_parser('action', actions)
|
||||
|
Loading…
Reference in New Issue
Block a user