From c812147c405a57d0e31eff12579e6590f68050d4 Mon Sep 17 00:00:00 2001 From: Ricel Leite Date: Wed, 18 Feb 2026 22:49:20 -0300 Subject: [PATCH] fix: import models in init_db to ensure table creation --- app/core/database.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/core/database.py b/app/core/database.py index d9d5793..20a302f 100644 --- a/app/core/database.py +++ b/app/core/database.py @@ -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)