[
  {
    "type": "alter_table",
    "description": "Add deterministic solver columns to aiScheduleSuggestions table (Spec 038 Phase 1 Track A)",
    "database": "{{store}}",
    "check_query": "SHOW COLUMNS FROM aiScheduleSuggestions WHERE Field = 'solverType'",
    "sql": "ALTER TABLE `aiScheduleSuggestions` ADD COLUMN `solverType` enum('ai','math') NOT NULL DEFAULT 'ai' COMMENT 'Solver engine used' AFTER `suggestionId`, ADD COLUMN `solverStatus` varchar(20) DEFAULT NULL COMMENT 'OPTIMAL|FEASIBLE|INFEASIBLE' AFTER `solverType`, ADD COLUMN `optimalityGap` decimal(8,4) DEFAULT NULL COMMENT 'Gap percentage 0=optimal' AFTER `solverStatus`, ADD COLUMN `solverDurationMs` int(10) unsigned DEFAULT NULL COMMENT 'Solver execution time in ms' AFTER `optimalityGap`, ADD COLUMN `constraintReport` text NULL COMMENT 'JSON binding constraints slack IIS data' AFTER `solverDurationMs`, ADD COLUMN `scorecard` text NULL COMMENT 'JSON labor cost fairness CV coverage OT hours' AFTER `constraintReport`, ADD COLUMN `improvementSuggestions` text NULL COMMENT 'JSON array of LLM improvement suggestions' AFTER `scorecard`, ADD INDEX `idx_solver_type` (`solverType`), ADD INDEX `idx_week_solver` (`weekStart`, `solverType`)"
  }
]
