diff --git a/doc/source/dev/manual_install.rst b/doc/source/dev/manual_install.rst index 1b1c36b685..a0dfbc6064 100644 --- a/doc/source/dev/manual_install.rst +++ b/doc/source/dev/manual_install.rst @@ -212,7 +212,7 @@ Prepare database ---------------- * Initialize the database:: - # trove-manage --config-file= db_wipe trove_test.sqlite mysql fake + # trove-manage --config-file= 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(`):: diff --git a/tools/start-fake-mode.sh b/tools/start-fake-mode.sh index a4fbf95257..761964a714 100755 --- a/tools/start-fake-mode.sh +++ b/tools/start-fake-mode.sh @@ -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 \ diff --git a/trove/cmd/manage.py b/trove/cmd/manage.py index bfe684f664..986a382bed 100755 --- a/trove/cmd/manage.py +++ b/trove/cmd/manage.py @@ -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)