1
0
mirror of https://github.com/janeczku/calibre-web synced 2024-11-28 12:30:00 +00:00

Move "create_engine" call

This commit is contained in:
Ozzie Isaacs 2021-02-07 09:39:36 +01:00
parent 60497c60c1
commit e0ce135838

View File

@ -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)