setup-rhodecode always presents interactive prompt to destroy database

Issue #507 resolved
homebrewtc created an issue

I encountered an issue in which unattended and quiet executions of setup-rhodecode always present the following prompt:

paster setup-rhodecode /var/lib/rhodecode/production.ini --user=admin --password=mypassword --repos=/srv/repos -q 2012-07-20 17:20:58.184 INFO [rhodecode.model] initializing db for Engine(postgresql://rhodecode:password@ 2012-07-20 17:20:58.184 INFO [rhodecode.lib.db_manage] Any existing database is going to be destroyed Are you sure to destroy old database ? [y/n]

The expected behavior is for setup-rhodecode to check for an existing db, and if it is either non-existent, or uninitialized (ie: no tables exist) then proceed to execute the setup without any prompt. If the database is populated, fail-fast with a human readable error message indicating the DB is already in place.

If the -q is not specified, and the db exists and is populated, a prompt should be presented to the user providing them with the choice to destroy the existing database.

Comments (1)

  1. Log in to comment