-- Add requests array to users table
ALTER TABLE public.users
    ADD COLUMN requests TEXT[] DEFAULT ARRAY[]::TEXT[];

-- Create index for the requests array for better performance
CREATE INDEX idx_users_requests ON public.users USING GIN (requests);

-- Add policy for requests field
CREATE
POLICY "Users can only see their own requests" ON public.users FOR
SELECT
    USING (auth.uid () = uuid);