diff options
| author | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-04-27 13:45:09 +0300 |
|---|---|---|
| committer | l3wdfut4pwr <l3wdfut4pwr@gmail.com> | 2026-04-27 13:45:09 +0300 |
| commit | 4848a9e9394b283022085a6305d00f94b11cd703 (patch) | |
| tree | d7ba45885f110e8ded4af20bc98b9f88f75b1f4a /app/utils/create_tables.py | |
| parent | f1842be3bfabe7850d33662da2da377676144c48 (diff) | |
add username change and logout
Diffstat (limited to 'app/utils/create_tables.py')
| -rw-r--r-- | app/utils/create_tables.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/app/utils/create_tables.py b/app/utils/create_tables.py index e438a03..0d2eaa2 100644 --- a/app/utils/create_tables.py +++ b/app/utils/create_tables.py @@ -1,7 +1,10 @@ from app.models.user import Base -from app.utils.db import engine +from app.utils.db import get_engine -async def init_db(): +async def init_db() -> None: + + engine = get_engine() + async with engine.begin() as conn: await conn.run_sync(Base.metadata.create_all) |
