text: from nonebot import get_app, get_driver
  from sqlalchemy.orm import sessionmaker
  from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
  from sqlalchemy.ext.declarative import declarative_base
  
  Base = declarative_base()
  
  engine = create_async_engine(get_driver().config.database_url, echo=True)
  async_session = sessionmaker(engine, expire_on_commit=False, class_=AsyncSession)
  
  app = get_app()
  @app.on_event('startup')
  async def _():
      async with engine.begin() as conn:
          # await conn.run_sync(Base.metadata.drop_all)
          await conn.run_sync(Base.metadata.create_all)
  