Updated main migration with a fix to include user name and avatar if these are found (e.g. they come from oAuth) (#65)
This commit is contained in:
committed by
GitHub
parent
b2f4cf039c
commit
2931f6bb1d
@@ -2297,8 +2297,8 @@ set
|
|||||||
declare
|
declare
|
||||||
user_name text;
|
user_name text;
|
||||||
begin
|
begin
|
||||||
if new.raw_user_meta_data ->> 'display_name' is not null then
|
if new.raw_user_meta_data ->> 'name' is not null then
|
||||||
user_name := new.raw_user_meta_data ->> 'display_name';
|
user_name := new.raw_user_meta_data ->> 'name';
|
||||||
|
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
@@ -2312,6 +2312,11 @@ begin
|
|||||||
|
|
||||||
end if;
|
end if;
|
||||||
|
|
||||||
|
if new.raw_user_meta_data ->> 'avatar_url' is not null then
|
||||||
|
new.picture_url := new.raw_user_meta_data ->> 'avatar_url';
|
||||||
|
|
||||||
|
end if;
|
||||||
|
|
||||||
insert into public.accounts(
|
insert into public.accounts(
|
||||||
id,
|
id,
|
||||||
primary_owner_user_id,
|
primary_owner_user_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user