Database migrations

This commit is contained in:
2026-06-12 07:14:50 -07:00
parent 0535c68647
commit 96eeb442fd
9 changed files with 337 additions and 20 deletions

View File

@@ -10,7 +10,7 @@ import os
from pathlib import Path
from . import crud
from .database import create_db_and_tables, get_session
from .database import run_migrations, get_session
from .ws import manager
EVENT_PAGE_SIZE = 50
@@ -19,7 +19,7 @@ BASE_DIR = Path(__file__).parent
@asynccontextmanager
async def lifespan(app: FastAPI):
create_db_and_tables()
run_migrations()
yield
app = FastAPI(title="Rats with Gats Remote Play API", lifespan=lifespan)