File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11"""Database configuration and session management"""
22
3+ import logging
4+
35from sqlalchemy .ext .asyncio import AsyncSession , async_sessionmaker , create_async_engine
46from sqlalchemy .orm import DeclarativeBase
57
68from app .config import get_settings
79
10+ logger = logging .getLogger (__name__ )
811settings = get_settings ()
912
1013engine = create_async_engine (
@@ -36,5 +39,12 @@ async def get_db() -> AsyncSession:
3639
3740async def init_db ():
3841 """Initialize database tables"""
39- async with engine .begin () as conn :
40- await conn .run_sync (Base .metadata .create_all )
42+ try :
43+ async with engine .begin () as conn :
44+ await conn .run_sync (Base .metadata .create_all )
45+ except Exception as e :
46+ # Ignore "already exists" errors from race conditions with multiple workers
47+ if "already exists" in str (e ):
48+ logger .debug ("Database tables already exist, skipping creation" )
49+ else :
50+ raise
Original file line number Diff line number Diff line change @@ -271,7 +271,7 @@ export default function Setup() {
271271 border : "none" ,
272272 } }
273273 >
274- Continue
274+ Sign up
275275 </ Button >
276276 </ Form . Item >
277277 </ Form >
@@ -284,7 +284,7 @@ export default function Setup() {
284284 marginTop : 32 ,
285285 } }
286286 >
287- LMStack
287+ © Infinirc LLC
288288 </ p >
289289 </ div >
290290 </ div >
You can’t perform that action at this time.
0 commit comments