ALTER TABLE public.attendance ADD COLUMN IF NOT EXISTS duty_post_id UUID REFERENCES public.duty_posts(id) ON DELETE SET NULL;
CREATE INDEX IF NOT EXISTS idx_attendance_duty_post_id ON public.attendance(duty_post_id);