• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / cli / 27206472359
65%

Build:
DEFAULT BRANCH: develop
Ran 09 Jun 2026 12:38PM UTC
Jobs 1
Files 223
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Jun 2026 12:35PM UTC coverage: 64.636% (+0.3%) from 64.303%
27206472359

push

github

web-flow
fix(cli): provision platform baseline in declarative baseline catalog (#5521)

Refs CLI-1601 —
https://linear.app/supabase/issue/CLI-1601/support-auth-dependencies-in-shadow-db-migrations

Follow-up to #5515. That PR taught the declarative apply path to
provision the Supabase platform baseline (auth/storage/realtime) on the
shadow before applying declarative schemas. This fixes a gap it left in
the `generate` → `sync`-with-no-migrations handoff.

## The bug

`getGenerateBaselineCatalogRef` exports
`.temp/pgdelta/catalog-baseline-<version>.json` immediately after
creating the shadow — **before** any platform setup runs — so the cached
baseline represents a bare postgres image.

That same file is reused by `getMigrationsCatalogRef` as the diff
**source** when there are zero local migrations. After #5515, the
declarative **target** is built on top of the platform baseline. So a
no-migration `sync` diffs:

- source: bare postgres image
- target: platform baseline + declarative schema

instead of the intended:

- source: platform baseline
- target: platform baseline + declarative schema

Platform-managed objects (`auth`, `storage`, `realtime`, grants,
functions, …) no longer cancel and surface as spurious additions in the
generated migration — e.g. a single declarative `public.profiles` table
referencing `auth.users` produces a migration that also tries to create
the `auth`/`storage`/`realtime` platform objects.

## The fix

Provision the platform baseline in `getGenerateBaselineCatalogRef`
**before** exporting, so the baseline catalog consistently means
"platform baseline, no user migrations" — identical to
`diff.MigrateShadowDatabase` with zero migrations, and in parity with
the declarative target. The now-redundant second `setupShadowDatabase`
call in `Generate`'s cache-warm path is removed since the reused shadow
already has the baseline (it was previously provisioning the platform
twice).

This also fixes a latent `generate` issue: with a bare baselin... (continued)

10506 of 16254 relevant lines covered (64.64%)

7.13 hits per line

Coverage Regressions

Lines Coverage ∆ File
147
55.18
12.39% internal/db/declarative/declarative.go
Jobs
ID Job ID Ran Files Coverage
1 27206472359.1 09 Jun 2026 12:38PM UTC 223
64.64
GitHub Action Run
Source Files on build 27206472359
  • Tree
  • List 223
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27206472359
  • 82e6d069 on github
  • Prev Build on develop (#27200095421)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc