Database migrations
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user