Fix alembic migration module import error by adding project root to Python path
generated with BackendIM... (backend.im)
This commit is contained in:
parent
aeab17a8ea
commit
489906c063
@ -1,10 +1,15 @@
|
||||
from logging.config import fileConfig
|
||||
import os
|
||||
import sys
|
||||
|
||||
from sqlalchemy import engine_from_config
|
||||
from sqlalchemy import pool
|
||||
|
||||
from alembic import context
|
||||
|
||||
# Add the parent directory to the Python path
|
||||
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
||||
|
||||
# this is the Alembic Config object, which provides
|
||||
# access to the values within the .ini file in use.
|
||||
config = context.config
|
||||
|
Loading…
x
Reference in New Issue
Block a user