Declarative Schemas 2.0 with pg-delta
Supabase CLI migrations now include RLS policy changes, grants, view settings, partitions, and domains. This update ensures the declarative schema state is fully synchronized with the database configuration.
Verified State Diff
Impact & Verification Analysis
Supabase developers managing database schemas via the CLI and CI/CD pipelines.
It eliminates manual migration scripting for security policies and complex database objects, significantly reducing the risk of human error and ensuring consistent environment parity.
Full Fact Overview
The introduction of pg-delta within the Supabase CLI addresses a critical gap in the declarative migration workflow. Previously, the CLI's diffing engine ignored specific PostgreSQL objects, forcing developers to manually manage RLS policies, role-based grants, and complex schema structures like partitions and domains. By integrating pg-delta, the CLI now performs a comprehensive state comparison, ensuring that the generated migration files accurately reflect the intended database schema, thereby reducing configuration drift and manual intervention requirements.