BEGIN;

-- Add notes column to letter_incoming_dispositions_department table
ALTER TABLE letter_incoming_dispositions_department
ADD COLUMN IF NOT EXISTS notes TEXT;

-- Add index for better performance when querying by status with notes
CREATE INDEX IF NOT EXISTS idx_letter_incoming_disposition_dept_status_notes 
ON letter_incoming_dispositions_department(status) 
WHERE notes IS NOT NULL;

COMMIT;