bugfix:修复notice事件扩散问题 (#2132)

* bugfix:修复notice事件扩散问题

* 优化并发调度

* bugfix:修复签到样式

* bugfix:功能调用统计修复

* bugfix:修复私聊时功能调用统计显示已退群问题

* 提高插件适配兼容性

* 优化发送队列

* 修改权限检查设计

* 继续修改权限检查设计

* 完善权限检查设计

* 优化sqlite配置

* 优化数据库初始化

* 代码整理,无用代码清理

* bugfix:修复启动时数据库校验问题

* bugfix:修复预算裁剪过于激进问题
This commit is contained in:
Copaan
2026-05-28 22:57:28 +08:00
committed by GitHub
parent 12fc5663fb
commit 5596497947
57 changed files with 7557 additions and 1522 deletions
+6 -29
View File
@@ -2,9 +2,9 @@ from typing import Literal, overload
from tortoise import fields
from zhenxun.configs.config import BotConfig
from zhenxun.services.cache.runtime_cache import BotMemoryCache
from zhenxun.services.db_context import Model
from zhenxun.services.db_context.schema_ops import AlterColumnType, RenameColumn
from zhenxun.utils.enum import CacheType
@@ -470,32 +470,9 @@ class BotConsole(Model):
@classmethod
async def _run_script(cls):
db_type = (BotConfig.get_sql_type() or "").lower()
scripts = [
"ALTER TABLE bot_console RENAME COLUMN block_plugin TO block_plugins;",
"ALTER TABLE bot_console RENAME COLUMN block_task TO block_tasks;",
"ALTER TABLE bot_console ADD available_plugins text default '';",
"ALTER TABLE bot_console ADD available_tasks text default '';",
return [
RenameColumn("bot_console", "block_plugin", "block_plugins"),
RenameColumn("bot_console", "block_task", "block_tasks"),
AlterColumnType("bot_console", "block_plugins", "TEXT"),
AlterColumnType("bot_console", "block_tasks", "TEXT"),
]
if "postgres" in db_type:
scripts.extend(
[
"ALTER TABLE bot_console ALTER COLUMN block_plugins TYPE TEXT;",
"ALTER TABLE bot_console ALTER COLUMN block_tasks TYPE TEXT;",
"ALTER TABLE bot_console ALTER COLUMN available_plugins TYPE TEXT;",
"ALTER TABLE bot_console ALTER COLUMN available_tasks TYPE TEXT;",
]
)
elif "mysql" in db_type:
scripts.extend(
[
"ALTER TABLE bot_console MODIFY COLUMN block_plugins TEXT;",
"ALTER TABLE bot_console MODIFY COLUMN block_tasks TEXT;",
"ALTER TABLE bot_console MODIFY COLUMN available_plugins TEXT;",
"ALTER TABLE bot_console MODIFY COLUMN available_tasks TEXT;",
]
)
return scripts