-- Allow participants to see the split record even if it's not active anymore
DROP POLICY IF EXISTS "bottle_splits_participant_view" ON bottle_splits;
CREATE POLICY "bottle_splits_participant_view" ON bottle_splits
FOR SELECT USING (
  EXISTS (
    SELECT 1 FROM split_participants 
    WHERE split_id = bottle_splits.id AND user_id = (SELECT auth.uid())
  )
);
