Session 2026-05-29: profile layout 2-col, file browser copy/paste, fbq-proxy/backfill fns, migrations, UI updates
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
alter table public.profiles
|
||||
add column if not exists avatar_url text;
|
||||
|
||||
insert into storage.buckets (id, name, public)
|
||||
select 'avatars', 'avatars', true
|
||||
where not exists (select 1 from storage.buckets where id = 'avatars');
|
||||
|
||||
do $$
|
||||
begin
|
||||
if not exists (select 1 from pg_policies where policyname = 'Avatar images are publicly accessible' and tablename = 'objects') then
|
||||
execute 'create policy "Avatar images are publicly accessible" on storage.objects for select using (bucket_id = ''avatars'')';
|
||||
end if;
|
||||
if not exists (select 1 from pg_policies where policyname = 'Users can upload their own avatar' and tablename = 'objects') then
|
||||
execute 'create policy "Users can upload their own avatar" on storage.objects for insert with check (bucket_id = ''avatars'' and auth.uid()::text = (storage.foldername(name))[1])';
|
||||
end if;
|
||||
if not exists (select 1 from pg_policies where policyname = 'Users can update their own avatar' and tablename = 'objects') then
|
||||
execute 'create policy "Users can update their own avatar" on storage.objects for update using (bucket_id = ''avatars'' and auth.uid()::text = (storage.foldername(name))[1])';
|
||||
end if;
|
||||
end $$;
|
||||
@@ -0,0 +1,5 @@
|
||||
alter table public.profiles
|
||||
add column if not exists website text,
|
||||
add column if not exists linkedin text,
|
||||
add column if not exists instagram text,
|
||||
add column if not exists twitter text;
|
||||
@@ -0,0 +1,3 @@
|
||||
alter table public.profiles
|
||||
drop column if exists instagram,
|
||||
drop column if exists twitter;
|
||||
@@ -0,0 +1,2 @@
|
||||
alter table public.profiles
|
||||
drop column if exists title;
|
||||
Reference in New Issue
Block a user