diff --git a/cps/ub.py b/cps/ub.py index b295c6e3..1969ef53 100644 --- a/cps/ub.py +++ b/cps/ub.py @@ -673,11 +673,12 @@ 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)