mirror of
https://github.com/dat515-2025/Group-8.git
synced 2026-03-22 15:12:08 +01:00
fix(db): updated db setup for tests
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user