diff --git a/kallithea/bin/kallithea_cli_db.py b/kallithea/bin/kallithea_cli_db.py --- a/kallithea/bin/kallithea_cli_db.py +++ b/kallithea/bin/kallithea_cli_db.py @@ -57,7 +57,7 @@ def db_create(user, password, email, rep ) dbmanage = DbManage(dbconf=dbconf, root=kallithea.CONFIG['here'], tests=False, cli_args=cli_args) - dbmanage.create_tables(override=True) + dbmanage.create_tables() repo_root_path = dbmanage.prompt_repo_root_path(None) dbmanage.create_settings(repo_root_path) dbmanage.create_default_user() diff --git a/kallithea/lib/db_manage.py b/kallithea/lib/db_manage.py --- a/kallithea/lib/db_manage.py +++ b/kallithea/lib/db_manage.py @@ -72,7 +72,7 @@ class DbManage(object): init_model(engine) self.sa = Session() - def create_tables(self, override=False): + def create_tables(self): """ Create a auth database """ @@ -110,8 +110,7 @@ class DbManage(object): # known to work on SQLite - possibly not on other databases with strong referential integrity Base.metadata.drop_all() - checkfirst = not override - Base.metadata.create_all(checkfirst=checkfirst) + Base.metadata.create_all(checkfirst=False) # Create an Alembic configuration and generate the version table, # "stamping" it with the most recent Alembic migration revision, to diff --git a/kallithea/tests/fixture.py b/kallithea/tests/fixture.py --- a/kallithea/tests/fixture.py +++ b/kallithea/tests/fixture.py @@ -366,7 +366,7 @@ def create_test_env(repos_test_path, con dbmanage = DbManage(dbconf=dbconf, root=config['here'], tests=True) - dbmanage.create_tables(override=True) + dbmanage.create_tables() # for tests dynamically set new root paths based on generated content dbmanage.create_settings(dbmanage.prompt_repo_root_path(repos_test_path)) dbmanage.create_default_user()