forked from FOSS/ASF-Control-Bot
feat(bot): add async DB and FSM state handling
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
from bot.db import models # noqa: F401
|
||||
from bot.db.base import Base
|
||||
from bot.db.session import engine
|
||||
|
||||
|
||||
async def init_db() -> None:
|
||||
async with engine.begin() as connection:
|
||||
await connection.run_sync(Base.metadata.create_all)
|
||||
Reference in New Issue
Block a user