Fixed alembic errors in CI (maybe)
Some checks failed
CI / Lint & Format (push) Has been cancelled
CI / Tests (Pytest + Alembic + Postgres) (push) Has been cancelled
CI / Docker Build (push) Has been cancelled

This commit is contained in:
2025-09-22 20:08:12 +01:00
parent cf1f01efc0
commit 84e03b2ae9
3 changed files with 73 additions and 5 deletions

View File

@@ -1,9 +1,11 @@
import asyncio
import sys, pathlib
# Add project root (parent of the "alembic" dir) to sys.path
PROJECT_ROOT = pathlib.Path(__file__).resolve().parents[1]
if str(PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(PROJECT_ROOT))
from logging.config import fileConfig
from sqlalchemy import pool
from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine
from alembic import context
# Import your app's config & models