Created
November 24, 2024 04:06
-
-
Save itoonx/23dc549c5aedc0462b5b1fa82925d659 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION "public"."create_profile_on_signup"() RETURNS "trigger" | |
LANGUAGE "plpgsql" SECURITY DEFINER | |
AS $$begin | |
INSERT INTO public.profile (id) | |
VALUES ( | |
NEW.id | |
); | |
RETURN NEW; | |
end;$$; | |
create trigger create_profile_on_signup after insert on auth.users for each row execute function create_profile_on_signup(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment