{"record":{"id":"d58a9a890aa372c7","repo":"hasura/graphql-engine","slug":"error-while-deleting-status-for-database-s-w","errorCode":null,"errorMessage":"error while deleting status for database '%s': %w","messagePattern":"error while deleting status for database '(.+?)': %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/commands/migrate_delete.go","lineNumber":134,"sourceCode":"\to.EC.Spin(\"Removing migrations\")\n\tdefer o.EC.Spinner.Stop()\n\n\tif o.EC.AllDatabases {\n\t\tsourcesAndKind, err := metadatautil.GetSourcesAndKind(\n\t\t\to.EC.APIClient.V1Metadata.ExportMetadata,\n\t\t)\n\t\tif err != nil {\n\t\t\treturn errors.E(op, fmt.Errorf(\"got error while getting the sources list : %w\", err))\n\t\t}\n\n\t\tfor _, source := range sourcesAndKind {\n\t\t\to.Source = cli.Source(source)\n\n\t\t\terr := o.RunOnSource()\n\t\t\tif err != nil {\n\t\t\t\treturn errors.E(\n\t\t\t\t\top,\n\t\t\t\t\tfmt.Errorf(\n\t\t\t\t\t\t\"error while deleting status for database '%s': %w\",\n\t\t\t\t\t\to.Source.Name,\n\t\t\t\t\t\terr,\n\t\t\t\t\t),\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\treturn nil\n\t}\n\n\to.Source = o.EC.Source\n\n\terr := o.RunOnSource()\n\tif err != nil {\n\t\treturn errors.E(op, err)\n\t}\n","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/commands/migrate_delete.go#L116-L152","documentation":"Wrapped error returned per-source when RunOnSource fails during an --all-databases delete. The message identifies which database source failed; the underlying error explains why.","triggerScenarios":"One of the sources enumerated from metadata failing deletion: version not found on that source, server-side removal error, or filesystem error deleting migration files for that source's directory.","commonSituations":"Sources with divergent migration histories (a version applied on one DB but absent on another), read-only migrations directories, partial previous deletions.","solutions":["Check the wrapped error for the specific cause","Run `hasura migrate status` against the named source","Fix or delete the offending source's migrations individually (drop --all-databases)","Ensure the migrations directory for that source is writable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"for _, src := range sources {\n  if err := o.RunOnSource(); err != nil {\n  \tlog.Printf(\"source %s failed: %v\", o.Source.Name, err) // continue other sources\n  }\n}","preventionTips":["Run migrate status per source before --all-databases deletes","Keep per-source migration histories consistent"],"tags":["multi-source","wrapper","migrations","hasura"],"backgroundTag":"per-source-operation-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}