-- Phase 1 / Migration 4
-- Seed rm_model_config for rm_2.0
-- Canonical runtime flags remain env-only per approved plan.
-- No DB feature-flag rows are created in this migration.
-- Pre-check:
-- SELECT model_version, is_active FROM rm_model_config WHERE model_version = 'rm_2.0';
-- Post-check:
-- SELECT model_version, is_active, config_json->'nba' AS nba_weights
-- FROM rm_model_config WHERE model_version = 'rm_2.0';
-- Rollback:
-- DELETE FROM rm_model_config WHERE model_version = 'rm_2.0';

INSERT INTO rm_model_config (model_version, config_json, is_active)
VALUES (
  'rm_2.0',
  '{
    "nba": {"grok": 0.30, "piff": 0.30, "digimon": 0.25, "dvp": 0.08, "rag": 0.07},
    "nhl": {"grok": 0.40, "piff": 0.35, "dvp": 0.10, "rag": 0.15},
    "mlb": {"grok": 0.20, "mlb_matchup": 0.25, "mlb_phase": 0.25, "fangraphs": 0.15, "piff": 0.05, "dvp": 0.05, "rag": 0.05},
    "ncaab": {"grok": 0.55, "kenpom": 0.45},
    "soccer": {"grok": 0.40, "piff": 0.40, "corner_scout": 0.20}
  }'::jsonb,
  true
)
ON CONFLICT (model_version) DO NOTHING;
