Rewrite sqlachemy code for 1.4 to 2.x migration

This commit is contained in:
2024-01-11 20:48:13 +01:00
committed by Brain
parent 146eb995a8
commit 2ff958c55f
4 changed files with 9 additions and 9 deletions

2
app.py
View File

@ -38,7 +38,7 @@ app.config["KI_LDAP_AUTH_PASSWORD"] = os.getenv("KI_LDAP_AUTH_PASSWORD")
app.config["KI_LDAP_BASE_DN"] = os.getenv("KI_LDAP_BASE_DN")
CORS(app)
db = SQLAlchemy(app)
db = SQLAlchemy(app, session_options={"future": True})
migrate = Migrate(app, db, compare_type=True)
app.logger.info("Hello from KI")