From a2ec99950194119decdf8f1d210e44dae23c697b Mon Sep 17 00:00:00 2001 From: Automated Action Date: Wed, 18 Jun 2025 09:31:49 +0000 Subject: [PATCH] Fix database migration error by adding project root to Python path in env.py --- migrations/env.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/migrations/env.py b/migrations/env.py index 901bd96..4ca63e0 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -1,8 +1,14 @@ +import sys +from pathlib import Path from logging.config import fileConfig from alembic import context from sqlalchemy import engine_from_config, pool +# Add project root to Python path +project_root = Path(__file__).parent.parent +sys.path.insert(0, str(project_root)) + from app.db.base import Base # this is the Alembic Config object, which provides