Added realtime subcription to calendar page

This commit is contained in:
Alexis
2024-08-24 22:34:51 +02:00
parent 245b46661a
commit 1985ffdbe9
2 changed files with 61 additions and 1 deletions

View File

@@ -160,6 +160,9 @@ alter table public.calendar_events enable row level security;
alter table public.calendar_event_categories enable row level security;
alter table public.calendar_event_categories_links enable row level security;
-- Add realtime
alter publication supabase_realtime add table calendars;
-- User policies
create policy "Allow logged-in read access" on public.users for select using ( auth.role() = 'authenticated' );
create policy "Allow individual insert access" on public.users for insert with check ( auth.uid() = id );