-- Add payment state to capsules

ALTER TABLE capsules
  ADD COLUMN paid_at DATETIME NULL AFTER updated_at,
  ADD KEY idx_capsules_user_id_paid_at (user_id, paid_at),
  ADD KEY idx_capsules_paid_at_created_at (paid_at, created_at);

