Skip to content

D11 · Migration files stay editable until cutover

Accepted · 2026-10-02 · zuki

Decision: until the cutover run, the files in supabase/migrations are the schema's source and may be edited, merged or regenerated, the RLS file from gen_rls.py included. Staging is rebuilt from main every night by the rehearsal job, which holds staging credentials only. Nothing is pushed to production before cutover week. At cutover the files are frozen into a baseline, and from then on changes are new files only.

Why: staging is wiped nightly and production stays empty until cutover, so nothing depends on migration history yet. Fixing forward now would pile up ALTER files across 70 tables.

Consequences: everyone runs pnpm supabase db reset after pulling. Pushing to production stays human-only. The database workflow guide's "never edit a pushed migration" applies from cutover on.