Skip to content

feat(cli): upgrade pg-delta next to alpha.46 - #6300

Open
avallete wants to merge 6 commits into
developfrom
feat/upgrade-pg-delta-alpha.46
Open

feat(cli): upgrade pg-delta next to alpha.46#6300
avallete wants to merge 6 commits into
developfrom
feat/upgrade-pg-delta-alpha.46

Conversation

@avallete

@avallete avallete commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Bump @supabase/pg-delta from 1.0.0-alpha.42 to 1.0.0-alpha.46 so db diff, db pull, and db schema declarative generate pick up supabase-profile parameter-ACL filtering, OWNED BY with the owning table, per-statement load fallback, vault_presence, and reconnect-on-stuck load assist.
  • Delete the CLI copy of platform parameter-ACL filtering; the engine profile now owns that coverage.
  • Pretty-print generated SQL by default (uppercase keywords, indent 2, aligned columns).
  • Prepare declarative shadows only when files recreate image defaults (pgjwt / pgcrypto / uuid-ossp); omit means keep. Restore image pgjwt after a pgcrypto-only drop only if it was installed. On PG14, detach storage.objects.id before dropping uuid-ossp.
  • CREATE EXTENSION detection is -- / /* */ / simple '...' plus a regex (pathological SQL is an accepted miss). Prep uses pool.query; a locked DROP can delay Ctrl-C like other sites.

Extracted from #6274 so the engine upgrade can land on develop without the schema-first command stack.

Linked issue

Supabase maintainer change; no public issue to close.

  • The linked issue is open and carries the open-for-contribution label (or I'm a Supabase maintainer).

Checklist

  • The PR title follows Conventional Commits (e.g. feat(cli): …).
  • Tests added or updated for the change.
  • pnpm check:all and pnpm test pass for the workspace(s) I touched.

Consume OWNED BY / load assist, drop the CLI parameter-ACL workaround,
pretty-print generated SQL, and only strip image extensions when
declarations recreate them.
@avallete
avallete requested a review from a team as a code owner August 22, 2026 17:37

@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: f387bcc80e

ℹ️ 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/shared/legacy-pgdelta-declarative-shadow-prep.ts Outdated
Comment thread apps/cli/src/legacy/commands/db/shared/legacy-pgdelta-declarative-shadow-prep.ts Outdated
@github-actions

github-actions Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@1387b702443e4b010302218921d201e5dca34d60

Preview package for commit 1387b70.

PG17 ships pgcrypto without pgjwt. Restoring pgjwt after every pgcrypto
recreate invented a CREATE EXTENSION the project never declared.
Nested comments and E-strings were still leaking CREATE EXTENSION into
prep drops. Checkout the shadow client so interrupt and socket errors
cannot hang or crash the shared pool.

@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: d57990ece8

ℹ️ 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/shared/legacy-pgdelta-declarative-shadow-prep.ts Outdated
A table named "CREATE EXTENSION pgcrypto" was treated as a declaration
and could drop the image default. Scan keywords while skipping "..." spans.

@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: 6af0469c46

ℹ️ 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/shared/legacy-pgdelta-declarative-shadow-prep.ts Outdated
Shadow prep only needs comments and simple strings stripped before a
regex. Nested comments, E-strings, and quoted-ident scanning were not
worth the complexity.
Use pool.query again so a locked DROP waits like other sites, and keep scenario tests for the drop/restore contract.

@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: 1387b70244

ℹ️ 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".

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