MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / migrateDatabasesIfNeeded

Method migrateDatabasesIfNeeded

apps/desktop/main/index.ts:225–232  ·  view source on GitHub ↗
(runtime: RuntimeIdentity)

Source from the content-addressed store, hash-verified

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() {

Callers 1

initMethod · 0.95

Calls 5

checkMigrationNeededFunction · 0.90
migrateAllDatabasesFunction · 0.90
getPathProviderFunction · 0.90

Tested by

no test coverage detected