-- SheListens — migration 011: scheduled plan changes
-- Switching plans while already on an active one used to cancel the old
-- plan and start the new one immediately, cutting the current period
-- short. This adds a 'scheduled' status so a plan change can be queued to
-- take over the moment the current period actually ends instead (see
-- lib/subscriptions.php and subscriptions/select.php).
-- Run via phpMyAdmin or: mysql -u USER -p DBNAME < migrations/011_scheduled_plan_changes.sql

ALTER TABLE subscriptions
  MODIFY status ENUM('active','cancelled','expired','scheduled') NOT NULL DEFAULT 'active';
