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
+12 -4
View File
@@ -3,6 +3,7 @@ from typing import ClassVar
from tortoise import fields
from zhenxun.services.db_context import Model
from zhenxun.services.db_context.schema_ops import AlterColumnType, RenameColumn
class Statistics(Model):
@@ -32,9 +33,16 @@ class Statistics(Model):
@classmethod
async def _run_script(cls):
return [
"ALTER TABLE statistics RENAME COLUMN user_qq TO user_id;",
RenameColumn("statistics", "user_qq", "user_id"),
# 将user_qq改为user_id
"ALTER TABLE statistics ALTER COLUMN user_id TYPE character varying(255);",
"ALTER TABLE statistics ALTER COLUMN group_id TYPE character varying(255);",
"ALTER TABLE statistics ADD bot_id Text DEFAULT '';",
AlterColumnType(
"statistics",
"user_id",
{"postgres": "character varying(255)", "mysql": "VARCHAR(255)"},
),
AlterColumnType(
"statistics",
"group_id",
{"postgres": "character varying(255)", "mysql": "VARCHAR(255)"},
),
]