DROP POLICY IF EXISTS "Authenticated users can view groups" ON public.groups; DROP POLICY IF EXISTS "Unauthenticated users can view public groups" ON public.groups; DROP POLICY IF EXISTS "Public ...
-- The issue: The existing INSERT policy uses auth.role() which is not a valid -- Supabase function. This causes group creation to fail. -- The solution: Use the proper TO authenticated syntax and ...