Fix database migration error by adding project root to Python path in env.py

This commit is contained in:
Automated Action 2025-06-18 09:31:49 +00:00
parent 9e56bda916
commit a2ec999501

View File

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