hasura/graphql-engine · error

error while deleting status for database '%s': %w

Error message

error while deleting status for database '%s': %w

What it means

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.

Source

Thrown at cli/commands/migrate_delete.go:134

	o.EC.Spin("Removing migrations")
	defer o.EC.Spinner.Stop()

	if o.EC.AllDatabases {
		sourcesAndKind, err := metadatautil.GetSourcesAndKind(
			o.EC.APIClient.V1Metadata.ExportMetadata,
		)
		if err != nil {
			return errors.E(op, fmt.Errorf("got error while getting the sources list : %w", err))
		}

		for _, source := range sourcesAndKind {
			o.Source = cli.Source(source)

			err := o.RunOnSource()
			if err != nil {
				return errors.E(
					op,
					fmt.Errorf(
						"error while deleting status for database '%s': %w",
						o.Source.Name,
						err,
					),
				)
			}
		}

		return nil
	}

	o.Source = o.EC.Source

	err := o.RunOnSource()
	if err != nil {
		return errors.E(op, err)
	}

View on GitHub (pinned to 724551b9ae)

Solutions

  1. Check the wrapped error for the specific cause
  2. Run `hasura migrate status` against the named source
  3. Fix or delete the offending source's migrations individually (drop --all-databases)
  4. Ensure the migrations directory for that source is writable
Defensive patterns

Strategy: try-catch

Try / catch

for _, src := range sources {
  if err := o.RunOnSource(); err != nil {
  	log.Printf("source %s failed: %v", o.Source.Name, err) // continue other sources
  }
}

Prevention

When it happens

Trigger: 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.

Common situations: Sources with divergent migration histories (a version applied on one DB but absent on another), read-only migrations directories, partial previous deletions.

Related errors


AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28). Data as JSON: /api/errors/d58a9a890aa372c7. Report an issue: GitHub.