Skip to content

feat: DBDiff rc.30, reading as of the scan's own instant, and the version matrix in CI - #150

Merged
jasdeepkhalsa merged 5 commits into
mainfrom
chore/dbdiff-rc30
Oct 21, 2026
Merged

jasdeepkhalsa merged 5 commits into
mainfrom
chore/dbdiff-rc30

Conversation

@jasdeepkhalsa

Copy link
Copy Markdown
Member

Bumps @dbdiff/cli to 3.0.0-rc.30, and adds the version matrix to CI.

Commit What it does
DBDiff rc.30, reading as of the scan's own instant rc.30 reads each side as of one snapshot, and can join one another session holds. The schema and data diffs are now given the scan's snapshot, so every check and both diffs see each database at the same instant. --no-snapshot reaches DBDiff too. The release also fixes: MySQL foreign-key index order; data UPDATEs naming a column only one side has; PostgreSQL 18's NOT NULL constraints against older servers, on partitions and through renames; and MAINTAIN written for servers before 17.
CI: SupaForge between every pair of Supabase and PostgreSQL versions One job per pair of Supabase 15 and 17 and PostgreSQL 14–18, each way, each on two servers it starts. Each job runs a first sync, drift with live rows (renames, a retype under a generated column, views and a policy, --prove), and a snapshot restored into a fresh database, all judged from the servers' catalogs. Pull requests run 10 pairs covering each kind of crossing; all 49 run nightly and on demand.

Tests:

  • The unit suite and lint pass.
  • New tests check that the scan's snapshot, or --no-snapshot, reaches DBDiff's arguments.
  • The full 49-pair matrix passed against the rc.30 changes before release.

🤖 Generated with Claude Code

jasdeepkhalsa and others added 5 commits October 20, 2026 23:31
A job per pair of Supabase 15 and 17 and PostgreSQL 14 to 18, each way,
on two servers it starts: a first sync, drift with live rows on the
target (renames, a retype under a generated column, views and a policy,
--prove), and a snapshot restored into a fresh database, each judged
by the servers' catalogs. A pull request runs pairs covering each kind
of crossing; every pair runs nightly and on demand.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dbdiff/cli 3.0.0-rc.30 reads each side as of one snapshot, and can join
one another session holds: the schema and data diffs are now given the
scan's, so every check and both diffs see each database at the same
instant; --no-snapshot reaches it too. It also orders MySQL's foreign
key indexes so they can be dropped, leaves a column only one side has
out of a data UPDATE, handles PostgreSQL 18's NOT NULL constraints
against older servers, on partitions and through renames, and writes no
MAINTAIN for a server before 17.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two of the script's helpers had been cut out with code that was removed,
so every pair failed at its fixture. They are back, and a server now
counts as up only once it answers over TCP three times running: on first
start the image initialises with a server only its socket reaches, then
restarts it. A fixture that fails says why.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Every job pulled Supabase's PostgreSQL images anonymously at the same
time, and the registry refused with "toomanyrequests: Data limit
exceeded", failing every pair with Supabase 17. They are now fetched
once — from Docker Hub, or Amazon's public registry failing that — and
kept in the Actions cache, from which each job loads them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e apply

From Supabase to plain PostgreSQL, a view dbdiff replaces carries its
grants, to anon among them; with no such role on the target the GRANT
failed, and the view — and every view reading it — was left out. A
policy for such a role also made --prove decline the whole migration.

The schema check now leaves out of each fix the grants, revokes and
policies naming a role the target does not have, keeping the rest; one
left with nothing is held back and says why, its SQL kept so a proof
knows it stays different on purpose. The roles check reports grants to
such a role on its own.

Found by the version matrix on a fresh PostgreSQL server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jasdeepkhalsa
jasdeepkhalsa merged commit b67b17e into main Oct 21, 2026
29 checks passed
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.

1 participant