Download enable_rls.sql from scomb2/Michel: direct link, hf CLI and curl.
- Browser
- Download file 908 Bytes
-
https://huggingface.co/spaces/scomb2/Michel/resolve/main/enable_rls.sql
- Command line
-
hf download hf://spaces/scomb2/Michel/enable_rls.sql
-
curl -L -o enable_rls.sql https://huggingface.co/spaces/scomb2/Michel/resolve/main/enable_rls.sql
908 Bytes
| -- Enable RLS on all tables to fix Supabase security advisories | |
| -- rls_disabled_in_public + sensitive_columns_exposed | |
| -- | |
| -- Run this in Supabase Dashboard > SQL Editor: | |
| -- https://supabase.com/dashboard/project/wlkktggaewerugaoygcp/sql/new | |
| -- | |
| -- Once RLS is enabled with no policies, anon/authenticated roles get zero access. | |
| -- Your backend (psycopg2 via table owner) is unaffected. | |
| ALTER TABLE users ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE conversations ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE messages ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE user_profiles ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE memories ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE guest_ip_log ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE shared_conversations ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE payment_history ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE admin_audit_log ENABLE ROW LEVEL SECURITY; | |
| ALTER TABLE oauth_accounts ENABLE ROW LEVEL SECURITY; | |