-- ============================================================
-- Migration: add progress tracking to enrollments
-- Run this once against your EXISTING database (you already imported
-- the original config/schema.sql, so only run this incremental change):
--
--   mysql -u your_db_user -p triccess_hospitality < config/migrations/001_enrollment_progress.sql
-- ============================================================

ALTER TABLE enrollments
  ADD COLUMN progress_percent TINYINT UNSIGNED DEFAULT 0 AFTER status;

-- Optional: seed a bit of realistic variety into any existing sample
-- enrollments so the new dashboards aren't empty on first load.
UPDATE enrollments SET progress_percent = 100 WHERE status = 'completed';
UPDATE enrollments SET progress_percent = 35 WHERE status = 'active' AND progress_percent = 0;
