Files
akmon/enable_realtime_gateway.sql
2026-01-20 08:04:15 +08:00

17 lines
575 B
PL/PgSQL

-- Enable Realtime for chat_gateway_nodes table
-- This is required for WebSocket updates to work
begin;
-- 1. Add table to the publication
alter publication supabase_realtime add table chat_gateway_nodes;
-- 2. Ensure RLS is either disabled or has a policy allowing access
-- Option A: Disable RLS (Simplest for internal tools)
alter table chat_gateway_nodes disable row level security;
-- Option B: If you must keep RLS, add a policy for anonymous/authenticated users
-- create policy "Allow read access for all" on chat_gateway_nodes for select using (true);
commit;