From 4bd111cbe78679982a081fdfbd849e2ef5d4d129 Mon Sep 17 00:00:00 2001 From: jigsaw Date: Fri, 9 Aug 2024 15:18:05 +0800 Subject: [PATCH] :construction_worker: no orm prompts --- docker/.env | 3 --- docker/bot.py | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/.env b/docker/.env index 76fd96f..c4c7821 100644 --- a/docker/.env +++ b/docker/.env @@ -1,8 +1,5 @@ DRIVER=~fastapi+~aiohttp -# ORM -ALEMBIC_STARTUP_CHECK - # All4One 的配置 OBIMPL_CONNECTIONS=[{"type":"websocket_rev","url":"ws://127.0.0.1:8080/onebot/v12/"}] # 自定义加载的 Middleware,默认加载全部 diff --git a/docker/bot.py b/docker/bot.py index 5703da1..9a9278f 100644 --- a/docker/bot.py +++ b/docker/bot.py @@ -14,4 +14,11 @@ nonebot.load_plugin("nonebot_plugin_all4one") if __name__ == "__main__": + # 不让 orm 弹该死的升级提示 + from nonebot_plugin_orm import _init_orm + from nonebot_plugin_orm.migrate import AlembicConfig, upgrade + + _init_orm() + upgrade(AlembicConfig()) + nonebot.run()