Skip to content

fix(cli): deprecate db diff --use-pg-schema (CLI-1960) - #6060

Merged
Coly010 merged 4 commits into
developfrom
columferry/cli-1960-deprecate-db-diff-use-pg-schema-keep-it-as-the-sole
Aug 5, 2026
Merged

fix(cli): deprecate db diff --use-pg-schema (CLI-1960)#6060
Coly010 merged 4 commits into
developfrom
columferry/cli-1960-deprecate-db-diff-use-pg-schema-keep-it-as-the-sole

Conversation

@Coly010

@Coly010 Coly010 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What changed

db diff --use-pg-schema wraps the in-process Go library github.com/stripe/pg-schema-diff (apps/cli-go/internal/db/diff/pgschema.go) — a direct in-process call (sql.Open + pgschema.Generate), no container image, no shell-out. There is no TS/WASM binding for this library. Per the M9 "Go removal" milestone's own pre-named decision, this is the sanctioned keep-in-Go exception — it is not being ported.

This PR:

  • Adds a new TS-only stderr deprecation warning, printed before delegating to Go, additive to Go's own existing "experimental" warning (cmd/db.go:121). Fires only when --use-pg-schema is actually honored (mirrors Go's own warning gate — no notice on the explicit --from/--to path or when the flag has no effect).
  • Updates --help text for the flag to note the deprecation.
  • Updates SIDE_EFFECTS.md and docs/go-cli-porting-status.md to record the deprecation and the keep-in-Go rationale.
  • No removal timeline is promised — removal date is explicitly out of scope for this issue (a follow-up decision via PostHog usage telemetry, per the issue).

Why (keep-in-Go rationale)

Per github.com/stripe/pg-schema-diff being an in-process library with no container/binary boundary and no TS/WASM equivalent, porting isn't feasible within this milestone. Contrast with --use-pgadmin, which IS a plain container invocation and is tracked separately as a real port candidate (CLI-1968) — that one is NOT a keep-in-Go case. Full rationale recorded on the Linear issue and in SIDE_EFFECTS.md.

Docs are phrased conditionally ("will be the sole remaining Go delegation once --use-pgadmin, the db __shadow/db __db-bootstrap seams, and other in-flight M9 issues are done") rather than claiming present-tense exclusivity, since several other delegations are still live elsewhere in the milestone.

Fixes CLI-1960

Review notes

Reviewed independently by go-parity-auditor, engineer-reviewer, and architect-reviewer. All three converged on two doc issues (an unresolvable tooling-path reference, and the present-tense "sole remaining Go delegation" overclaim), plus an unowned removal-timeline promise in the warning text — all fixed in the second commit. Behavioral change confirmed additive/stderr-only with the underlying Go delegation untouched.

Coly010 added 2 commits August 4, 2026 15:06
…on (CLI-1960)

--use-pg-schema wraps the in-process Go library stripe/pg-schema-diff
(apps/cli-go/internal/db/diff/pgschema.go) with no TS/container equivalent, so
it is the M9 milestone's own sanctioned keep-in-Go exception rather than a
port candidate. Deprecate the flag instead: print a TS-only stderr warning
before delegating (additive to Go's own unchanged "experimental" warning),
mark it deprecated in --help, and record the boundary/migration path
(--use-pg-delta or the default migra engine) in SIDE_EFFECTS.md and
go-cli-porting-status.md.
…ion (CLI-1960)

Fix three review-flagged doc problems from the --use-pg-schema deprecation
notice: replace the unresolvable ~/.claude/skills reference in SIDE_EFFECTS.md
with inline keep-in-Go criteria and a CLI-1960 decision-record citation, drop
the meta-commentary about PR review process, and rephrase the "sole remaining
Go delegation" claim as conditional (--use-pgadmin, the db __shadow/
__db-bootstrap seams, and other in-flight M9 issues still delegate today) in
both SIDE_EFFECTS.md and docs/go-cli-porting-status.md.

Also drop the unowned removal-timeline promise from the deprecation warning
and --help text, pointing at "the pg-delta engine" instead of the bare
--use-pg-delta flag name (ambiguous with db pull's own deprecated flag), and
update the integration test assertions to check a stable substring instead of
the full sentence.
@Coly010

Coly010 commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Coly010 Coly010 changed the title fix(cli): deprecate db diff --use-pg-schema, keep as sole Go delegation (CLI-1960) fix(cli): deprecate db diff --use-pg-schema (CLI-1960) Aug 4, 2026
Coly010 added 2 commits August 4, 2026 17:33
…0-deprecate-db-diff-use-pg-schema-keep-it-as-the-sole

# Conflicts:
#	apps/cli/docs/go-cli-porting-status.md
@Coly010 Coly010 self-assigned this Aug 5, 2026
@Coly010
Coly010 marked this pull request as ready for review August 5, 2026 08:51
@Coly010
Coly010 requested a review from a team as a code owner August 5, 2026 08:51
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@7f747efb77870e9e6d2f864fa9b876d3ff68b280

Preview package for commit 7f747ef.

@Coly010
Coly010 added this pull request to the merge queue Aug 5, 2026
Merged via the queue into develop with commit a37365a Aug 5, 2026
29 checks passed
@Coly010
Coly010 deleted the columferry/cli-1960-deprecate-db-diff-use-pg-schema-keep-it-as-the-sole branch August 5, 2026 14:11
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.

2 participants