Crte tabels

This commit is contained in:
2026-04-13 15:41:40 +02:00
parent 69d1d484a2
commit 3cc2c975f3

View File

@@ -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(