Skip to content

fix(cli): bump default pg-delta version to pick up PUBLIC-privilege revoke fix - #5970

Merged
Coly010 merged 1 commit into
developfrom
columferry/cli-1947-db-diff-omits-default-privileges-and-function-execute
Jul 28, 2026
Merged

fix(cli): bump default pg-delta version to pick up PUBLIC-privilege revoke fix#5970
Coly010 merged 1 commit into
developfrom
columferry/cli-1947-db-diff-omits-default-privileges-and-function-execute

Conversation

@Coly010

@Coly010 Coly010 commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

What changed

supabase db diff (pg-delta engine) silently dropped REVOKE ... FROM PUBLIC privilege changes (default privileges and function EXECUTE) from generated migrations when diffing a declarative schema. Root cause was in the upstream @supabase/pg-delta library: filterPublicBuiltInDefaults() unconditionally stripped PUBLIC's implicit default privilege from both sides of a privilege diff, silently eating any REVOKE ... FROM PUBLIC the declarative schema asked for.

Fixed upstream in supabase/pg-toolbelt#357 (merged), released as @supabase/pg-delta@1.0.0-alpha.33.

This PR:

  • Bumps the two CLI-side "default pg-delta npm version" constants from 1.0.0-alpha.32 to 1.0.0-alpha.33 (apps/cli-go/pkg/config/pgdelta_version.go, apps/cli/src/legacy/commands/db/shared/legacy-pgdelta.deno-templates.ts). These are the only version-pin sources of truth — the embedded Deno template scripts always use a fixed placeholder string that gets substituted at runtime, so they're unaffected.
  • Adds apps/cli/src/legacy/commands/db/diff/diff.live.test.ts, a live regression test against a real local Docker stack: a declarative schema revoking a function's implicit PUBLIC EXECUTE grant, diffed with db diff --local --use-pg-delta, must produce a migration that actually contains the REVOKE statement. Verified empirically in both directions — passes with the alpha.33 pin, and (temporarily reverting to alpha.32) reproduces the silent omission pre-fix.

Fixes #5930

Related

Linear: CLI-1947

…evoke fix

@supabase/pg-delta unconditionally stripped PUBLIC's implicit default
privilege from both sides of a privilege diff, silently dropping any
REVOKE ... FROM PUBLIC a declarative schema asked for (supabase/pg-toolbelt#308).
Fixed upstream in supabase/pg-toolbelt#357, released as
@supabase/pg-delta@1.0.0-alpha.33.

Fixes #5930
@Coly010
Coly010 requested a review from a team as a code owner July 28, 2026 10:47

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ace9387f3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/cli/src/legacy/commands/db/diff/diff.live.test.ts
@github-actions

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@0ace9387f3d229870976c8222d0cae0bfc304f95

Preview package for commit 0ace938.

@Coly010 Coly010 self-assigned this Jul 28, 2026
@Coly010
Coly010 added this pull request to the merge queue Jul 28, 2026
Merged via the queue into develop with commit 76db729 Jul 28, 2026
37 checks passed
@Coly010
Coly010 deleted the columferry/cli-1947-db-diff-omits-default-privileges-and-function-execute branch July 28, 2026 15:08
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 omits default privileges and function EXECUTE changes from declarative schemas

2 participants