summaryrefslogtreecommitdiff
path: root/app/utils/create_tables.py
blob: 0d2eaa262e617476a8fb59ff66fcc11a6905be53 (plain)
1
2
3
4
5
6
7
8
9
10
from app.models.user import Base
from app.utils.db import get_engine


async def init_db() -> None:

    engine = get_engine()

    async with engine.begin() as conn:
        await conn.run_sync(Base.metadata.create_all)