diff --git a/backend/main.py b/backend/main.py index 7c02262..f682081 100644 --- a/backend/main.py +++ b/backend/main.py @@ -3,6 +3,7 @@ from contextlib import asynccontextmanager from fastapi import FastAPI +from sqlalchemy import text from database import engine, Base logging.basicConfig( @@ -88,6 +89,9 @@ async def _run(name, coro): async def lifespan(app: FastAPI): async with engine.begin() as conn: await conn.run_sync(Base.metadata.create_all) + await conn.execute( + text("INSERT INTO kitchens (id, name, created_at) VALUES (1, 'Hotel Number Four', NOW()) ON CONFLICT DO NOTHING") + ) await _run("Invoice features", run_migration) await _run("Newbook tables", run_newbook_migration)