-- ============================================================
-- Migration 069 (Phase 8 v2 narratives, 2026-04-29) — moral_choice_3
-- ============================================================
-- Permet aux missions narratives complexes (Hugues v2 avec 3 choix
-- séquentiels, H_01_REVEIL v2 avec choix imbriqué) de stocker un 3e
-- choix moral. Format clé rewards_conditional étendu :
--   "A" / "B" / "C"             (1 choix)
--   "A_A" / "A_B" / "B_A" / ... (2 choix)
--   "A_A_A" / "A_A_B" / ...     (3 choix)
-- MissionService.resolveMission cherche du plus précis au moins :
--   Lookup `${c1}_${c2}_${c3}` → fallback `${c1}_${c2}` → fallback `${c1}` → fallback rewards_success.
--
-- Idempotente : ADD COLUMN IF NOT EXISTS.
-- ============================================================

ALTER TABLE mission_progress
  ADD COLUMN IF NOT EXISTS moral_choice_3 varchar(1);

-- ============================================================
-- Contrôle post-migration
-- ============================================================
-- SELECT column_name FROM information_schema.columns WHERE table_name='mission_progress' AND column_name LIKE 'moral_choice%';
