fix: fix function for signups
This commit is contained in:
12
supabase/migrations/20250612153946_fix-signup.sql
Normal file
12
supabase/migrations/20250612153946_fix-signup.sql
Normal file
@@ -0,0 +1,12 @@
|
||||
CREATE OR REPLACE FUNCTION handle_new_user()
|
||||
RETURNS trigger
|
||||
LANGUAGE plpgsql
|
||||
SECURITY DEFINER
|
||||
SET search_path = ''
|
||||
AS $$
|
||||
BEGIN
|
||||
INSERT INTO public.users (id)
|
||||
VALUES (NEW.id);
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$;
|
||||
@@ -17,8 +17,8 @@ LANGUAGE plpgsql
|
||||
SET search_path = ''
|
||||
AS $$
|
||||
BEGIN
|
||||
INSERT INTO public.users (id, contact_email)
|
||||
VALUES (NEW.id, NEW.email);
|
||||
INSERT INTO public.users (id)
|
||||
VALUES (NEW.id);
|
||||
RETURN NEW;
|
||||
END;
|
||||
$$;
|
||||
|
||||
Reference in New Issue
Block a user