新增邮箱列表置顶排序

This commit is contained in:
eoao
2026-01-20 21:46:00 +08:00
parent cbae3ffbdf
commit 8a47418c91
8 changed files with 94 additions and 24 deletions

View File

@@ -26,10 +26,21 @@ const dbInit = {
await this.v2_5DB(c);
await this.v2_6DB(c);
await this.v2_7DB(c);
await this.v2_8DB(c);
await settingService.refresh(c);
return c.text('success');
},
async v2_8DB(c) {
try {
await c.env.db.batch([
c.env.db.prepare(`ALTER TABLE account ADD COLUMN sort INTEGER NOT NULL DEFAULT 0;`)
]);
} catch (e) {
console.warn(`跳过字段:${e.message}`);
}
},
async v2_7DB(c) {
try {
await c.env.db.batch([