-- Add failed_attempts column to sequence_enrollments for retry logic
-- When SMS fails, we retry up to 3 times before pausing

ALTER TABLE sequence_enrollments
ADD COLUMN IF NOT EXISTS failed_attempts INTEGER DEFAULT 0;

-- Add comment
COMMENT ON COLUMN sequence_enrollments.failed_attempts IS 'Number of failed send attempts. Resets on success. Enrollment pauses after 3 failures.';
