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:
2.08-2.53s while the five Supabase diff engines measured 38.7-57.7s. At 2,500 tables (~17,500 objects), supaschema measured 4.71-5.80s while the engines measured 268-352s:
Full workflow
The diff is only half the loop. Getting a migration and refreshed TypeScript/Zod contracts is onesupaschema sync dry-run workflow — against the CLI it takes three commands (db diff, apply, gen types) and a database that has already caught up. At 1,000 tables, the measured workflow medians were 7.34s for supaschema and 43.0-57.6s for the five Supabase workflows:
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 source-file, live-catalog, and full-workflow modes.
Successful Supabase direct and workflow output scores 0.800-1.000 across the fixtures. On the realistic, XL, and XXL fixtures, every engine misses the same RLS policy change, scoring 0.982, 0.999, and 0.999 respectively.
Replay safety
Reproduce
Start a disposable local PostgreSQL instance, then run the complete publication harness from this repository:benchmarks/ directory. The ignored comparison JSONs and generated summary are the source evidence; the 14 tracked SVGs are the publication artifacts.
