fix: import models in init_db to ensure table creation
This commit is contained in:
parent
3b727a8ee2
commit
c812147c40
|
|
@ -23,5 +23,8 @@ async def get_db() -> AsyncSession:
|
|||
await session.close()
|
||||
|
||||
async def init_db():
|
||||
# Import all models here to ensure they are registered with Base.metadata
|
||||
from app.models import User, Organization, OrganizationMember, Integration, Issue, AuditLog # noqa
|
||||
|
||||
async with engine.begin() as conn:
|
||||
await conn.run_sync(Base.metadata.create_all)
|
||||
|
|
|
|||
Loading…
Reference in New Issue