Files
thrilltrack-explorer/supabase/migrations/20251029021504_d204025d-b78c-4816-a64b-ae4a0f9be7aa.sql
2025-10-29 02:15:14 +00:00

17 lines
881 B
SQL

-- Phase 7: Remove Genuinely Duplicate RLS Policies
-- Target: 5 clear duplicates where ALL command makes specific actions redundant
-- 1. park_location_history: ALL already includes SELECT
DROP POLICY IF EXISTS "Moderators view location history" ON public.park_location_history;
-- 2. ride_coaster_stats: Remove one of the duplicate ALL policies
DROP POLICY IF EXISTS "Moderators manage coaster stats" ON public.ride_coaster_stats;
-- 3. entity_timeline_events: Remove redundant deny UPDATE policy
DROP POLICY IF EXISTS "Deny direct updates to timeline events" ON public.entity_timeline_events;
-- 4. reports: Keep MFA-required version, drop non-MFA version
DROP POLICY IF EXISTS "Moderators can update reports" ON public.reports;
-- 5. request_metadata: ALL command includes INSERT
DROP POLICY IF EXISTS "Service role can insert request metadata" ON public.request_metadata;