fix: drop-if-exists before recreating notifications RLS policies
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
-- Replace with per-user policy (everyone reads own) + admin-only policy for oversight.
|
||||
|
||||
DROP POLICY IF EXISTS "notifications_read_elevated" ON notifications_log;
|
||||
DROP POLICY IF EXISTS "notifications_read_own" ON notifications_log;
|
||||
DROP POLICY IF EXISTS "notifications_read_admin" ON notifications_log;
|
||||
|
||||
CREATE POLICY "notifications_read_own" ON notifications_log
|
||||
FOR SELECT USING (recipient_user_id = auth.uid());
|
||||
|
||||
Reference in New Issue
Block a user