Fix Python path in migrations/env.py for Alembic database migrations
This commit is contained in:
parent
61a9c8a000
commit
600c8b17af
@ -1,9 +1,14 @@
|
||||
import sys
|
||||
from logging.config import fileConfig
|
||||
|
||||
from sqlalchemy import engine_from_config
|
||||
from sqlalchemy import pool
|
||||
from pathlib import Path
|
||||
|
||||
from alembic import context
|
||||
from sqlalchemy import engine_from_config, pool
|
||||
|
||||
# Add the project root directory to the Python path
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
# Now we can import from app
|
||||
from app.db.base import Base
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
|
Loading…
x
Reference in New Issue
Block a user