fix(cli): surface crashed migra diffs (CLI-2204) - #6240
Merged
avallete merged 1 commit intoAug 18, 2026
Merged
Conversation
Contributor
Supabase CLI previewnpx --yes https://pkg.pr.new/supabase/cli/supabase@3a66c486b1768eda09aa0b2ab6cf90eeb5ff7252Preview package for commit |
avallete
approved these changes
Aug 18, 2026
avallete
deleted the
7ttp/cli-2204-db-diff-use-migra-reports-no-schema-changes-found-when
branch
August 18, 2026 08:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
fixes
db diff --use-migraprinting "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_ERRORon 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: