Initial commit: WealthWise financial analytics platform

This commit is contained in:
2026-02-14 21:16:57 +05:30
commit b8588df583
171 changed files with 29048 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
"""Initialize database tables.
This script creates all database tables defined in the models.
Run this before starting the application for the first time.
"""
import asyncio
from sqlalchemy.ext.asyncio import create_async_engine
from app.core.config import get_settings
from app.models.base import BaseModel
settings = get_settings()
async def init_db():
"""Create all database tables."""
engine = create_async_engine(settings.DATABASE_URL, echo=True)
async with engine.begin() as conn:
await conn.run_sync(BaseModel.metadata.create_all)
await engine.dispose()
print("Database tables created successfully!")
if __name__ == "__main__":
asyncio.run(init_db())