insert into public.profiles (id, role) select u.id, 'patient' from auth.users u left join public.profiles p on p.id = u.id where p.id is null;