优化多个地方

This commit is contained in:
eoao
2025-09-03 08:31:44 +08:00
parent 97a7950808
commit b4954e948b
30 changed files with 156 additions and 89 deletions

View File

@@ -21,7 +21,6 @@ const init = {
await this.v1_5DB(c);
await this.v1_6DB(c);
await this.v1_7DB(c);
await this.v1_7DB(c);
await this.v2DB(c);
await settingService.refresh(c);
return c.text(t('initSuccess'));
@@ -34,7 +33,8 @@ const init = {
c.env.db.prepare(`ALTER TABLE setting ADD COLUMN region TEXT NOT NULL DEFAULT '';`),
c.env.db.prepare(`ALTER TABLE setting ADD COLUMN endpoint TEXT NOT NULL DEFAULT '';`),
c.env.db.prepare(`ALTER TABLE setting ADD COLUMN s3_access_key TEXT NOT NULL DEFAULT '';`),
c.env.db.prepare(`ALTER TABLE setting ADD COLUMN s3_secret_key TEXT NOT NULL DEFAULT '';`)
c.env.db.prepare(`ALTER TABLE setting ADD COLUMN s3_secret_key TEXT NOT NULL DEFAULT '';`),
c.env.db.prepare(`DELETE FROM perm WHERE perm_key = 'setting:clean'`)
]);
} catch (e) {
console.error(e.message)