-- Additive migration. Preserve existing history while new runs store their exact configuration. ALTER TABLE backtest_results ADD COLUMN IF NOT EXISTS configuration JSONB; ALTER TABLE backtest_results ADD COLUMN IF NOT EXISTS engine TEXT; CREATE UNIQUE INDEX IF NOT EXISTS idx_backtest_results_one_per_run ON backtest_results(run_id);