fix: drop-if-exists before recreating notifications RLS policies

This commit is contained in:
2026-07-12 17:34:44 +08:00
parent c80091c8d6
commit dba79c0f17
@@ -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());