From e0ce135838e85bc6f50626d25cc8d8aabad414a3 Mon Sep 17 00:00:00 2001 From: Ozzie Isaacs Date: Sun, 7 Feb 2021 09:39:36 +0100 Subject: [PATCH] Move "create_engine" call --- cps/ub.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cps/ub.py b/cps/ub.py index 1969ef53..b295c6e3 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -673,12 +673,11 @@ def init_db(app_db_path): Session.configure(bind=engine) session = Session() + Base.metadata.create_all(engine) if os.path.exists(app_db_path): - Base.metadata.create_all(engine) migrate_Database(session) clean_database(session) else: - Base.metadata.create_all(engine) create_admin_user(session) create_anonymous_user(session)