Source of truth
supabase/schemas/** is the canonical declarative desired-state for DDL. supabase/migrations/** — the 2026-05-28 baseline (00000000000000_baseline_2026_05_28_ddl.sql + …_data.sql) plus db diff-generated forward files — is what actually gets applied. (Backfill note: the existing schema is not yet bulk-exported into supabase/schemas/**; until that lands, the baseline + forward migrations are the operative SoT and schemas/** fills in as new DDL is authored declaratively.) Live projects: dev2 (anuwknikgsijbameytzr) / prod2 (aximlomrwfuhctxjhrsf).
Author DDL
- Edit
supabase/schemas/**. npm run db:schemas:diff -- -f <name>to generate a migration.supabase db resetto apply locally;supabase db pushto promote.
Regenerate types
npm run db:types (local) or npm run db:types:dev2 (from dev2). CI runs npm run db:types:check to catch DB↔types drift.
Never
Do not create or apply migrations via Supabase MCP (apply_migration) or the Dashboard — schema changes are CLI-only.