迁移跳过配置到新结构
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user