##// END OF EJS Templates
implements #507 setup-rhodecode always presents interactive prompt to destroy database, now -q flag fixes that
marcink -
r2651:957329c1 beta
parent child Browse files
Show More
@@ -61,13 +61,13 b' class DbManage(object):'
61 61 init_model(engine)
62 62 self.sa = meta.Session
63 63
64 def create_tables(self, override=False):
64 def create_tables(self, override=False, defaults={}):
65 65 """
66 66 Create a auth database
67 67 """
68
68 quiet = defaults.get('quiet')
69 69 log.info("Any existing database is going to be destroyed")
70 if self.tests:
70 if self.tests or quiet:
71 71 destroy = True
72 72 else:
73 73 destroy = ask_ok('Are you sure to destroy old database ? [y/n]')
@@ -38,7 +38,7 b' def setup_app(command, conf, vars):'
38 38 dbconf = conf['sqlalchemy.db1.url']
39 39 dbmanage = DbManage(log_sql=True, dbconf=dbconf, root=conf['here'],
40 40 tests=False)
41 dbmanage.create_tables(override=True)
41 dbmanage.create_tables(override=True, defaults=command.options.__dict__)
42 42 dbmanage.set_db_version()
43 43 opts = dbmanage.config_prompt(None, defaults=command.options.__dict__)
44 44 dbmanage.create_settings(opts)
General Comments 0
You need to be logged in to leave comments. Login now