koishi-plugin-bind-bot 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +5 -5
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -670,11 +670,6 @@ function apply(ctx, config) {
|
|
|
670
670
|
// 添加isAdmin索引,提高查询效率
|
|
671
671
|
indexes: [['isAdmin'], ['buidUid']]
|
|
672
672
|
});
|
|
673
|
-
// 在插件启动时执行数据迁移
|
|
674
|
-
ctx.on('ready', async () => {
|
|
675
|
-
logger.info('[初始化] 开始数据迁移和一致性检查...');
|
|
676
|
-
await addMissingFields();
|
|
677
|
-
});
|
|
678
673
|
// 检查表结构是否包含旧字段
|
|
679
674
|
const checkTableStructure = async () => {
|
|
680
675
|
try {
|
|
@@ -787,6 +782,11 @@ function apply(ctx, config) {
|
|
|
787
782
|
return false;
|
|
788
783
|
}
|
|
789
784
|
};
|
|
785
|
+
// 在插件启动时执行数据迁移(放在函数定义之后)
|
|
786
|
+
ctx.on('ready', async () => {
|
|
787
|
+
logger.info('[初始化] 开始数据迁移和一致性检查...');
|
|
788
|
+
await addMissingFields();
|
|
789
|
+
});
|
|
790
790
|
// 重建MCIDBIND表
|
|
791
791
|
const rebuildMcidBindTable = async () => {
|
|
792
792
|
try {
|