-- Half-day leave (counts as 0.5 casual). Run once in Supabase SQL editor.

alter table public.leave_applications
  add column if not exists duration_type text not null default 'full';

alter table public.leave_applications
  drop constraint if exists leave_applications_duration_type_check;

alter table public.leave_applications
  add constraint leave_applications_duration_type_check
  check (duration_type in ('full', 'half'));
