(runtime: RuntimeIdentity)
| 223 | |
| 224 | // 执行启动期数据库 schema 迁移;失败时必须中断,避免 schema 已升级但兼容门禁未落盘。 |
| 225 | migrateDatabasesIfNeeded(runtime: RuntimeIdentity) { |
| 226 | const { count } = checkMigrationNeeded() |
| 227 | if (count > 0) { |
| 228 | assertDesktopStartupMigrationSucceeded(migrateAllDatabases(runtime)) |
| 229 | } |
| 230 | |
| 231 | repairDesktopStartupCompatibilityGate(runtime, { pathProvider: getPathProvider() }) |
| 232 | } |
| 233 | |
| 234 | // 创建主窗口 |
| 235 | async createWindow() { |
no test coverage detected