supaschema compares policy definitions structurally. A changed USING expression, WITH CHECK expression, command, role list, or permissive/restrictive mode is treated as a real schema change.
Use this when
- Policy bodies are part of your access-control model.
- Reviewers need to see tenant-isolation changes.
- CI should catch drift between policy files and the database.
- Deploy should block when configured RLS safety rules fail.
- Supabase projects use
auth.uid()or platform roles in policies.
Do this
Keep policies in the declarative tree near the protected tables:workflow.rls_safety at deploy_blocking so supaschema sync refuses to mutate a target when RLS diagnostics fail.
Verify
Block drift in CI:Related
Supabase comparison
See why structural policy diffs matter.
CI gate
Gate policy changes before merge.
Check command
Surface policy changes with safety diagnostics.
Sync command
Block unsafe RLS changes before local or remote apply.

