(prefix string, err error)
| 329 | } |
| 330 | } |
| 331 | targetReady := map[string]any{"driver": targetDriver, "configured": targetPath != "", "path": targetPath, "parent_dir": filepath.Dir(targetPath)} |
| 332 | if dryRun { |
| 333 | summary := a.databaseMigrationSummary(store.BackendJSON, state, dryRun, snapshotBytes, targetReady) |
| 334 | summary["state_file"] = targetPath |
| 335 | skipAuditForDryRun(r) |
| 336 | ok(w, "迁移预检通过", summary) |
| 337 | return |
| 338 | } |
| 339 | preMigration, backupErr := a.store().BackupWithNote(a.cfg().DatabaseBackupDir, "数据库迁移前保护性备份") |
| 340 | if backupErr != nil { |
| 341 | failWithCode(w, http.StatusInternalServerError, ErrDBRestoreBackupFail, "迁移前备份失败") |
| 342 | return |
no outgoing calls
no test coverage detected