tasq/supabase/migrations/20260322200000_duty_schedules_realtime.sql
Marc Rejohn Castillano 049ab2c794 Added My Schedule tab in attendance screen
Allow 1 Day, Whole Week and Date Range swapping
2026-03-22 11:52:25 +08:00

11 lines
391 B
SQL

-- 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 $$;