Migration Workflow
Quick Start
- Identify schema change intent and target tables.
- Create a new migration using the documented workflow.
- Validate idempotency and RLS policy coverage.
- Apply migration to hosted Supabase.
- Regenerate types and verify.
Steps
- Follow
docs/DATABASE_PIPELINE.mdanddocs/supabase_branching.mdfor the approved flow. - Prefer repo scripts when available:
scripts/apply-single-migration.mjsscripts/apply-remote-migrations.mjs
- Ensure migration SQL uses
IF NOT EXISTSand is safe to re‑run. - After applying: regenerate types in
src/lib/generated/database.types.ts.
Checks
- RLS enabled on new tables.
- Policies tested or verified.
- No Docker‑dependent Supabase commands.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.