迁移跳过配置到新结构

This commit is contained in:
mtvpls
2026-01-01 10:06:59 +08:00
parent 9854f60716
commit 761ac4eaf3
11 changed files with 212 additions and 41 deletions
+8
View File
@@ -180,6 +180,7 @@ export class DbManager {
created_at: number;
playrecord_migrated?: boolean;
favorite_migrated?: boolean;
skip_migrated?: boolean;
} | null> {
if (typeof (this.storage as any).getUserInfoV2 === 'function') {
return (this.storage as any).getUserInfoV2(userName);
@@ -271,6 +272,13 @@ export class DbManager {
}
}
// ---------- 跳过配置迁移 ----------
async migrateSkipConfigs(userName: string): Promise<void> {
if (typeof (this.storage as any).migrateSkipConfigs === 'function') {
await (this.storage as any).migrateSkipConfigs(userName);
}
}
// ---------- 数据迁移 ----------
async migrateUsersFromConfig(adminConfig: AdminConfig): Promise<void> {
if (typeof (this.storage as any).createUserV2 !== 'function') {