diff --git a/migrations/env.py b/migrations/env.py index 84e5496..100490f 100644 --- a/migrations/env.py +++ b/migrations/env.py @@ -1,9 +1,16 @@ from logging.config import fileConfig +import sys +from pathlib import Path from sqlalchemy import engine_from_config from sqlalchemy import pool from alembic import context + +# This line adds the project root to the Python path +sys.path.insert(0, str(Path(__file__).parent.parent.absolute())) + +# Import after setting up the path from app.db.session import Base # this is the Alembic Config object, which provides