Overwrite repo with local files

This commit is contained in:
2026-02-20 14:59:31 -06:00
commit 82d5829ff4
53 changed files with 2630 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
-- 9. Trigger to push new auth users into public.users
create or replace function public.handle_new_user()
returns trigger
language plpgsql
security definer set search_path = ''
as $$
begin
insert into public.users (id, email, name)
values (new.id, new.email, new.raw_user_meta_data->>'full_name');
return new;
end;
$$;
drop trigger if exists on_auth_user_created on auth.users;
create trigger on_auth_user_created
after insert on auth.users
for each row execute procedure public.handle_new_user();