From 3cc2c975f36c9968f0c895bdfaf69c63597f7f58 Mon Sep 17 00:00:00 2001 From: Carsten Kvist Date: Mon, 13 Apr 2026 15:41:40 +0200 Subject: [PATCH] Crte tabels --- linedance-api/app/main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linedance-api/app/main.py b/linedance-api/app/main.py index 0dc8242c..c85f2f19 100644 --- a/linedance-api/app/main.py +++ b/linedance-api/app/main.py @@ -1,10 +1,17 @@ from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.core.database import engine, Base + +# Importer ALLE modeller så create_all kender dem +from app.models import ( + User, Song, Dance, DanceLevel, Project, ProjectMember, ProjectSong, + PlaylistShare, CommunityDance, CommunityDanceAlt, DanceAltRating, + SongDance, SongAltDance, +) from app.routers import auth, projects, songs, alternatives, dances, sync, sharing from app.websocket.manager import router as ws_router -# Opret tabeller hvis de ikke findes (til udvikling — brug Alembic i produktion) +# Opret tabeller hvis de ikke findes Base.metadata.create_all(bind=engine) app = FastAPI(