feat: Remove duplicate RLS policies

This commit is contained in:
gpt-engineer-app[bot]
2025-10-29 02:15:14 +00:00
parent 4ce2dc8975
commit fa8ba8969a

View File

@@ -0,0 +1,17 @@
-- 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;