MCPcopy Create free account
hub / github.com/Prejudice-Studio/Twilight / databasePostgresErrorMessage

Function databasePostgresErrorMessage

internal/api/database_admin.go:331–339  ·  view source on GitHub ↗
(prefix string, err error)

Source from the content-addressed store, hash-verified

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

Callers 1

handleDatabaseMigrateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected