Supabase Launches Declarative Schemas 2.0 with Native pg-delta Migration Engine Integration
Supabase updated its CLI with Declarative Schemas 2.0, replacing the Python-based migra tool with its custom open-source pg-delta engine. The update automatically captures diffs for Row Level Security policies, permissions, views, and other schema objects that previously required manual file editing.

Supabase has released Declarative Schemas 2.0, updating its database migration architecture within the Supabase CLI. The legacy Python-based diffing tool, migra, has been replaced by pg-delta, an open-source Postgres diffing engine built by Supabase. Declarative Schemas 2.0 is enabled by default for new projects, while existing projects can manually opt into the new engine.
Primary source
Open Supabase Blog ↗This article summarizes the source. Check the original for full details and conditions.
Comparison
| Aspect | Before / Alternative | After / This |
|---|---|---|
| Diff Engine | migra (Python-based tool) | pg-delta (custom open-source tool) |
| Schema Object Support | Required manual edits for RLS policies, grants, views, publications, domains, and comments | Automatically detects changes for RLS policies, grants, views, publications, domains, and comments |
Action Checklist
- Modify SQL schema definition files inside the local supabase/schemas/ directory Maintain your existing declarative workflow
- Generate database diffs using the updated Supabase CLI Verify that RLS policies and permissions are correctly captured in the generated migration
- Opt in existing projects manually to start using Declarative Schemas 2.0 New projects use 2.0 automatically by default



