fix: use db.engine instead of deprecated db.get_engine()
This commit is contained in:
@@ -22,7 +22,7 @@ def _migrate_db(app):
|
|||||||
conn.close()
|
conn.close()
|
||||||
|
|
||||||
with app.app_context():
|
with app.app_context():
|
||||||
engine = db.get_engine()
|
engine = db.engine
|
||||||
if "motor_vehicle_id" not in columns:
|
if "motor_vehicle_id" not in columns:
|
||||||
with engine.connect() as conn:
|
with engine.connect() as conn:
|
||||||
conn.execute(sa.text(
|
conn.execute(sa.text(
|
||||||
|
|||||||
Reference in New Issue
Block a user