Skip to content

fix(cli): surface crashed migra diffs (CLI-2204) - #6240

Merged
avallete merged 1 commit into
developfrom
7ttp/cli-2204-db-diff-use-migra-reports-no-schema-changes-found-when
Aug 18, 2026
Merged

fix(cli): surface crashed migra diffs (CLI-2204)#6240
avallete merged 1 commit into
developfrom
7ttp/cli-2204-db-diff-use-migra-reports-no-schema-changes-found-when

Conversation

@7ttp

@7ttp 7ttp commented Aug 17, 2026

Copy link
Copy Markdown
Member

TL;DR

fixes db diff --use-migra printing "No schema changes found" and exiting 0 when the migra template crashes, so a broken diff looked exactly like a clean one.
Fixed in both the go-cli and TS copies to avoid divergence confusion as cli-go gets deprecated.

The runner can't trust the exit code, since these scripts always tear the worker down and exit non-zero even on success, so it looks for PGDELTA_SCRIPT_ERROR on stderr instead. Every pg-delta template prints it; migra never did, so its stderr got dropped and the diff came back empty. migra's catch now prints it too.

ref:

@7ttp 7ttp self-assigned this Aug 17, 2026
@7ttp
7ttp requested a review from a team as a code owner August 17, 2026 23:09
@github-actions

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@3a66c486b1768eda09aa0b2ab6cf90eeb5ff7252

Preview package for commit 3a66c48.

@avallete
avallete added this pull request to the merge queue Aug 18, 2026
Merged via the queue into develop with commit c3750c9 Aug 18, 2026
29 checks passed
@avallete
avallete deleted the 7ttp/cli-2204-db-diff-use-migra-reports-no-schema-changes-found-when branch August 18, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

db diff --use-migra reports "No schema changes found" when migra.ts crashes (missing PGDELTA_SCRIPT_ERROR sentinel)

2 participants