-- ── Upgrade shop_orders: add shipped/delivered status + sms tracking ──
ALTER TABLE `shop_orders` 
  MODIFY COLUMN `status` ENUM('pending','paid','shipped','delivered','failed','cancelled') DEFAULT 'pending',
  ADD COLUMN IF NOT EXISTS `sms_sent` TINYINT(1) DEFAULT 0 AFTER `waafi_ref`;

-- ── Upgrade shop_products: track "recently added" (created_at already exists) ──
-- No changes needed, created_at already tracks this

-- ── Add index for stock alerts and search ──
ALTER TABLE `shop_products` ADD INDEX IF NOT EXISTS `idx_name` (`name`);
