Fix Alembic migration module import path issue

This commit is contained in:
Automated Action 2025-05-28 21:57:26 +00:00
parent 427f3c95a9
commit e0880e1fe5

View File

@ -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