From b0824aece1a81bbcdb86f8d8cbb5fb3d18d7da84 Mon Sep 17 00:00:00 2001 From: Automated Action Date: Sun, 11 May 2025 19:59:59 +0000 Subject: [PATCH] Fix alembic migration by adding project root to Python path generated with BackendIM... (backend.im) --- alembic/env.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alembic/env.py b/alembic/env.py index 3ea4777..ab232e2 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -1,4 +1,9 @@ from logging.config import fileConfig +import os +import sys + +# Add the parent directory to the path so imports work correctly +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from sqlalchemy import engine_from_config from sqlalchemy import pool