()
| 208 | |
| 209 | // 从 Electron 旧目录结构迁移到新的双根目录结构 |
| 210 | migrateToUnifiedDirsIfNeeded() { |
| 211 | if (needsUnifiedDirMigration()) { |
| 212 | console.log('[Main] Unified directory migration needed, starting...') |
| 213 | const result = migrateToUnifiedDirs() |
| 214 | if (result.success) { |
| 215 | console.log('[Main] Unified directory migration completed') |
| 216 | } else { |
| 217 | console.error('[Main] Unified directory migration failed:', result.error) |
| 218 | } |
| 219 | } else { |
| 220 | console.log('[Main] No unified directory migration needed') |
| 221 | } |
| 222 | } |
| 223 | |
| 224 | // 执行启动期数据库 schema 迁移;失败时必须中断,避免 schema 已升级但兼容门禁未落盘。 |
| 225 | migrateDatabasesIfNeeded(runtime: RuntimeIdentity) { |
no test coverage detected