-- Track how each payment was collected (plain card vs Apple Pay vs Google Pay) for analytics/support.
-- Populated from the charge's payment_method_details in the invoice.payment_succeeded webhook handler.
ALTER TABLE `payment_history`
  ADD COLUMN `payment_method_type` VARCHAR(20) NULL DEFAULT NULL AFTER `stripe_payment_intent_id`,  -- 'apple_pay' | 'google_pay' | 'card'
  ADD COLUMN `card_brand` VARCHAR(20) NULL DEFAULT NULL AFTER `payment_method_type`,                 -- 'visa' | 'mastercard' | ...
  ADD COLUMN `card_last4` VARCHAR(4) NULL DEFAULT NULL AFTER `card_brand`;
