
-- Add monthly assessment amount to units (unit-level override)
ALTER TABLE public.units ADD COLUMN IF NOT EXISTS monthly_assessment numeric DEFAULT null;

-- Add assessment scheduling fields to association_fee_rules
ALTER TABLE public.association_fee_rules 
  ADD COLUMN IF NOT EXISTS default_assessment_amount numeric DEFAULT 0,
  ADD COLUMN IF NOT EXISTS assessment_day integer DEFAULT 1,
  ADD COLUMN IF NOT EXISTS assessment_frequency text DEFAULT 'monthly';

-- Add interest opt-in flag to owners
ALTER TABLE public.owners ADD COLUMN IF NOT EXISTS interest_opt_in boolean DEFAULT false;
