uuid7으로 필드 및 처리관련 수정

This commit is contained in:
Dohyun Lim committed 2026-01-28 16:35:08 +09:00
1 parent aa8d9d7c14
commit 32ae5530b6
26 files changed
+2346 -901

No files matched your search

+18 -5
View File
@@ -72,18 +72,31 @@ async def create_db_tables():
import asyncio
# 모델 import (테이블 메타데이터 등록용)
# 주의: User를 먼저 import해야 UserProject가 User를 참조할 수 있음
from app.user.models import User # noqa: F401
from app.home.models import Image, Project, UserProject # noqa: F401
from app.user.models import User, RefreshToken # noqa: F401
from app.home.models import Image, Project # noqa: F401
from app.lyric.models import Lyric # noqa: F401
from app.song.models import Song # noqa: F401
from app.song.models import Song, SongTimestamp # noqa: F401
from app.video.models import Video # noqa: F401
# 생성할 테이블 목록 (SocialAccount 제외)
tables_to_create = [
User.__table__,
RefreshToken.__table__,
Project.__table__,
Image.__table__,
Lyric.__table__,
Song.__table__,
SongTimestamp.__table__,
Video.__table__,
]
logger.info("Creating database tables...")
async with asyncio.timeout(10):
async with engine.begin() as connection:
await connection.run_sync(Base.metadata.create_all)
await connection.run_sync(
lambda conn: Base.metadata.create_all(conn, tables=tables_to_create)
)
# FastAPI 의존성용 세션 제너레이터