This commit is contained in:
2025-12-07 18:05:05 +03:00
parent e263d2e235
commit ce41fdb432
4 changed files with 34 additions and 3 deletions

View File

@@ -0,0 +1,3 @@
-- Add logo_url column to halls table
alter table halls
add column logo_url text;

View 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' );