mirror of
https://github.com/JonathanHerrewijnen/calibre-web.git
synced 2024-11-11 05:33:57 +00:00
Move "create_engine" call
This commit is contained in:
parent
60497c60c1
commit
e0ce135838
@ -673,12 +673,11 @@ def init_db(app_db_path):
|
|||||||
Session.configure(bind=engine)
|
Session.configure(bind=engine)
|
||||||
session = Session()
|
session = Session()
|
||||||
|
|
||||||
if os.path.exists(app_db_path):
|
|
||||||
Base.metadata.create_all(engine)
|
Base.metadata.create_all(engine)
|
||||||
|
if os.path.exists(app_db_path):
|
||||||
migrate_Database(session)
|
migrate_Database(session)
|
||||||
clean_database(session)
|
clean_database(session)
|
||||||
else:
|
else:
|
||||||
Base.metadata.create_all(engine)
|
|
||||||
create_admin_user(session)
|
create_admin_user(session)
|
||||||
create_anonymous_user(session)
|
create_anonymous_user(session)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user