Supabase Migrations Advanced — Zero-Downtime Schema Changes in Production
Schema changes on a live PostgreSQL database demand care. Lock contention, full-table scans, and irreversible operations can bring your service down. This article covers Supabase migration best practices from a zero-downtime perspective.
Supabase Migration Basics
Supabase executes SQL files in supabase/migrations/ sequentially by timestamp.
supabase/migrations/ 20260101000000_create_users.sql 20260102000000_add_profile_fields.sql 20260103000000_create_posts.sql
Enter fullscreen mode
Exit fullscreen mode
The timestamp determines execution order.…