extremely confusing messages in setup-db

Issue #68 new
Teo Tei created an issue
# paster setup-db production.ini 
Running setup_app() from kallithea.websetup
2015-01-02 19:12:06.758 INFO  [kallithea.model] initializing db for mysql+pymysql://kallithea:XXXXX@localhost/kallithea
2015-01-02 19:12:06.759 INFO  [kallithea.lib.db_manage] Any existing database is going to be destroyed
Are you sure to destroy old database ? [y/n]n
Nothing done.

ANY EXISTING database??

Is it really going to destroy any existing database? I hope not. If it was, that would be a huge bug.

I guess it means any existing database with a given name, right? If so, then the warning must be clearer. E.g. "Going to create database <dbname>. Any database of the same name will be destroyed". Or whatever.

Also, the question: Are you sure to destroy old database ? [y/n]

seems to show up whether or not an old database actually exist. Which adds to the confusion (I don't have such a database, so I am entitled to think that it's really going to destroy other databases)

Comments (2)

  1. Anton Shestakov

    The message (and the prompt) indeeds shows up every time, even if the database doesn't exist. Given that the command has some options as --user and --email for the initial non-interactive database setup, this issue is probably the only thing that doesn't let the whole setup be automated. And --force-yes is not an option, since that always recreates the database, not just the first time.

  2. Log in to comment