From b3b64d39fee42db023f1eb3a5a2e4127e46ed6bf Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Mon, 4 Sep 2023 21:31:07 +0100 Subject: Add to sys.path in Alembic env --- alembic/env.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/alembic/env.py b/alembic/env.py index 91aca63..61b0843 100644 --- a/alembic/env.py +++ b/alembic/env.py @@ -1,12 +1,16 @@ import asyncio +import sys from logging.config import fileConfig from sqlalchemy import Connection, pool from sqlalchemy.ext.asyncio import async_engine_from_config from alembic import context -from metricity.database import build_db_uri -from metricity.models import Base + +sys.path.append(".") + +from metricity.database import build_db_uri # noqa: E402, I001 +from metricity.models import Base # noqa: E402 # this is the Alembic Config object, which provides # access to the values within the .ini file in use. -- cgit v1.2.3