From e0880e1fe5c75908a6944b27aedbe0c0048022af Mon Sep 17 00:00:00 2001 From: Automated Action Date: Wed, 28 May 2025 21:57:26 +0000 Subject: [PATCH] Fix Alembic migration module import path issue --- migrations/env.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/migrations/env.py b/migrations/env.py index 1e226e1..d01f348 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -1,8 +1,14 @@ from logging.config import fileConfig +import sys +from pathlib import Path + +# Add the parent directory to sys.path +sys.path.insert(0, str(Path(__file__).parent.parent)) from alembic import context from sqlalchemy import engine_from_config, pool +# Import application components after adding parent directory to path from app.db.session import Base from app.models import models # noqa from app.core.config import settings