Fix Alembic migration module import path issue
This commit is contained in:
parent
427f3c95a9
commit
e0880e1fe5
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user