Spaces:
Paused
Paused
Download supabase/migrations/002_rls_watches_monitors.sql from paras9909/opticparse-python: direct link, hf CLI and curl.
- Browser
- Download file 748 Bytes
-
https://huggingface.co/spaces/paras9909/opticparse-python/resolve/main/supabase/migrations/002_rls_watches_monitors.sql
- Command line
-
hf download hf://spaces/paras9909/opticparse-python/supabase/migrations/002_rls_watches_monitors.sql
-
curl -L -o 002_rls_watches_monitors.sql https://huggingface.co/spaces/paras9909/opticparse-python/resolve/main/supabase/migrations/002_rls_watches_monitors.sql
748 Bytes
| -- ============================================================================ | |
| -- Migration: Enable RLS on backend-only tables (watches, monitors) | |
| -- | |
| -- Description: | |
| -- These tables lack a user_id column and are never queried directly via the | |
| -- frontend using the anon key. Enabling RLS without defining any policies | |
| -- successfully locks them down so they cannot be read or modified by anyone | |
| -- accessing the Supabase REST/GraphQL API. The backend services connect directly | |
| -- via DATABASE_URL (PostgreSQL connection), which naturally bypasses RLS. | |
| -- ============================================================================ | |
| ALTER TABLE public.watches ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE public.monitors ENABLE ROW LEVEL SECURITY; | |