fix(db): updated db setup for tests

This commit is contained in:
ribardej
2025-11-11 16:28:12 +01:00
parent 3cdefc33fc
commit 25e587cea8
4 changed files with 10 additions and 36 deletions

View File

@@ -40,14 +40,6 @@ sentry_sdk.init(
fastApi = FastAPI()
@fastApi.on_event("startup")
async def on_startup():
# Ensure DB schema is created for tests/dev
from sqlalchemy.ext.asyncio import AsyncEngine
from sqlalchemy import text
async with engine.begin() as conn:
await conn.run_sync(Base.metadata.create_all)
# CORS for frontend dev server
fastApi.add_middleware(
CORSMiddleware,