home, lyric, song, video에 대한 app 추가, 각 app별 모델 추가, admin 추가, debug 모드 추가, lifespan에 debug시 동작하는 것으로 업데이트

This commit is contained in:
bluebamus committed 2025-12-20 23:16:35 +09:00
1 parent 6180c23151
commit 5f1b9da77e
74 files changed
+3437 -416

No files matched your search

+7 -5
View File
@@ -12,12 +12,14 @@ async def lifespan(app: FastAPI):
print("Starting up...")
try:
pass
# # 데이터베이스 테이블 생성
# from app.database.session import create_db_tables
from config import prj_settings
# await create_db_tables()
# print("Database tables ready")
# DEBUG 모드일 때만 데이터베이스 테이블 자동 생성
if prj_settings.DEBUG:
from app.database.session import create_db_tables
await create_db_tables()
print("Database tables created (DEBUG mode)")
except asyncio.TimeoutError:
print("Database initialization timed out")
# 타임아웃 시 앱 시작 중단하려면 raise, 계속하려면 pass