-- Enable realtime updates for duty_schedules so that schedule ownership -- changes (e.g. after a swap is accepted) propagate to all clients -- immediately without waiting for the next poll cycle. ALTER TABLE public.duty_schedules REPLICA IDENTITY FULL; DO $$ BEGIN ALTER PUBLICATION supabase_realtime ADD TABLE public.duty_schedules; EXCEPTION WHEN duplicate_object THEN NULL; END $$;