bug fixed
This commit is contained in:
1 parent
5f1b9da77e
commit
9e7e8eee4e
2 files changed
+26
-25
No files matched your search
+10
-13
@@ -37,22 +37,19 @@ AsyncSessionLocal = async_sessionmaker(
|
||||
|
||||
|
||||
async def create_db_tables():
|
||||
async with engine.begin() as connection:
|
||||
from app.lyric.models import ( # noqa: F401
|
||||
Attribute,
|
||||
PromptTemplate,
|
||||
SongResultsAll,
|
||||
SongSample,
|
||||
StoreDefaultInfo,
|
||||
)
|
||||
import asyncio
|
||||
|
||||
print("Creating database tables...")
|
||||
# 모델 import (테이블 메타데이터 등록용)
|
||||
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.video.models import Video # noqa: F401
|
||||
|
||||
import asyncio
|
||||
print("Creating database tables...")
|
||||
|
||||
async with asyncio.timeout(10):
|
||||
async with engine.begin() as connection:
|
||||
await connection.run_sync(Base.metadata.create_all)
|
||||
async with asyncio.timeout(10):
|
||||
async with engine.begin() as connection:
|
||||
await connection.run_sync(Base.metadata.create_all)
|
||||
|
||||
|
||||
# FastAPI 의존성용 세션 제너레이터
|
||||
|
||||
Reference in new issue
Block a user