迁移收藏到新数据结构

This commit is contained in:
mtvpls
2025-12-30 22:00:36 +08:00
parent f43d9c7d0e
commit 39f2bb3450
6 changed files with 268 additions and 34 deletions

View File

@@ -267,6 +267,13 @@ export class DbManager {
}
}
// ---------- 收藏迁移 ----------
async migrateFavorites(userName: string): Promise<void> {
if (typeof (this.storage as any).migrateFavorites === 'function') {
await (this.storage as any).migrateFavorites(userName);
}
}
// ---------- 数据迁移 ----------
async migrateUsersFromConfig(adminConfig: AdminConfig): Promise<void> {
if (typeof (this.storage as any).createUserV2 !== 'function') {