What problem does it solve?
Prevents unsafe or incomplete database changes in Supabase by guiding you to create migrations that correctly enable Row Level Security, define explicit policies, and validate security after deployment.
Core Features & Use Cases
- RLS-first migration workflow: Ensures every new/modified table follows project RLS rules (enabled, secure defaults, and documented policies).
- Policy correctness for read/write paths: Applies explicit SELECT policies and enforces
auth.uid() checks for INSERT/UPDATE to avoid over-permissioning.
- Post-migration security validation: Recommends running security advisor checks and confirming schema correctness, then regenerating TypeScript types when needed.
- Use Case: Adding a new multi-tenant table for user-scoped tracking (e.g.,
operator_sessions) with strict per-row access while keeping SELECT behavior intentional and auditable.
Quick Start
Use the command /supabase-migration and describe the schema change you want to make (new table, column, or RLS/policy update), then follow the migration checklist to generate and validate the SQL safely.