logo
This commit is contained in:
3
supabase/add_logo_url_to_halls.sql
Normal file
3
supabase/add_logo_url_to_halls.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
-- Add logo_url column to halls table
|
||||
alter table halls
|
||||
add column logo_url text;
|
||||
20
supabase/storage_setup.sql
Normal file
20
supabase/storage_setup.sql
Normal file
@@ -0,0 +1,20 @@
|
||||
-- 1. Create the storage bucket
|
||||
insert into storage.buckets (id, name, public)
|
||||
values ('hall-logos', 'hall-logos', true);
|
||||
|
||||
-- 2. Enable RLS (although buckets are publicly accessible via the 'public' flag, policies are good practice)
|
||||
create policy "Public Access"
|
||||
on storage.objects for select
|
||||
using ( bucket_id = 'hall-logos' );
|
||||
|
||||
create policy "Authenticated Uploads"
|
||||
on storage.objects for insert
|
||||
with check ( bucket_id = 'hall-logos' and auth.role() = 'authenticated' );
|
||||
|
||||
create policy "Authenticated Updates"
|
||||
on storage.objects for update
|
||||
with check ( bucket_id = 'hall-logos' and auth.role() = 'authenticated' );
|
||||
|
||||
create policy "Authenticated Deletes"
|
||||
on storage.objects for delete
|
||||
using ( bucket_id = 'hall-logos' and auth.role() = 'authenticated' );
|
||||
Reference in New Issue
Block a user