RLS enabled on a table but no CREATE POLICY found — app rows locked out
Part of the Migration & schema safety check · fix arrives as a pull request
What it is
A migration enables RLS on a table but creates no policy granting access to the application role.
Why it matters
Postgres RLS is default-deny, so every application query against that table returns zero rows — with no error. The UI shows empty lists and the logs look clean, which makes this unusually hard to diagnose.
How to fix it
Add policies immediately after enabling RLS: one per operation rather than FOR ALL, each scoped TO authenticated, with auth.uid() wrapped in a subselect so it is cached per query, plus an index on the owner column. Supabase reports the subselect and index together being up to 100× faster.
Run them all on your app
Connect your repo and your live services with read-only scopes. The first scan is free, and nothing changes without your approval.