supaschema with Supabase CLI diff engines on identical fixtures.
Each generated migration is:
- applied once;
- applied again;
- compared against the target catalog.
Short version: supaschema stays fast at large schema sizes, keeps F1 at
1.000, and produces migrations that survive a second apply.Speed and accuracy
At 1,000 tables (~7,000 objects),supaschema against each of the five Supabase CLI engines — median diff latency, accuracy (F1 vs a ground-truth change manifest), and whether the migration survives a second apply:
supaschema stays around three seconds — still scoring F1 1.000, while every engine still drops the same policy and still fails the second apply:
Full workflow
The diff is only half the loop. Once type outputs exist, getting a migration and refreshed types is onesupaschema diff — against the CLI it takes three commands (db diff, apply, gen types) and a database that has already caught up. End to end at 1,000 tables:
Accuracy
Diff output is scored two ways:- F1 against a ground-truth change manifest by object identity.
- Catalog fingerprint after applying the generated migration to a throwaway database.
supaschema scores F1 1.000 on every manifest-carrying fixture in file, live-database, and full-workflow modes.
The compared Supabase engines score 0.982-0.999 and miss the same RLS policy change. On that fixture, each generated migration also fails the fingerprint check.
Replay safety
supaschema also succeeds on the second apply for every fixture; the other engines emit unguarded column and index changes that fail when a migration is retried.
Reproduce
Run the benchmark harness from this repository:benchmarks/ directory.
