-- Reverse of 0020_acp_cost_budgets.up.sql (drop in reverse order).

DROP TABLE IF EXISTS acp_session_usage;

DROP INDEX IF EXISTS idx_acp_sessions_active_activity;

ALTER TABLE acp_sessions DROP COLUMN IF EXISTS terminated_reason;
ALTER TABLE acp_sessions DROP COLUMN IF EXISTS budget_max_wall_clock_seconds;
ALTER TABLE acp_sessions DROP COLUMN IF EXISTS budget_max_tokens;
ALTER TABLE acp_sessions DROP COLUMN IF EXISTS budget_max_cost_usd;
ALTER TABLE acp_sessions DROP COLUMN IF EXISTS last_activity_at;
ALTER TABLE acp_sessions DROP COLUMN IF EXISTS total_cost_usd;
ALTER TABLE acp_sessions DROP COLUMN IF EXISTS thinking_tokens;
ALTER TABLE acp_sessions DROP COLUMN IF EXISTS completion_tokens;
ALTER TABLE acp_sessions DROP COLUMN IF EXISTS prompt_tokens;

ALTER TABLE acp_agent_kinds DROP COLUMN IF EXISTS max_wall_clock_seconds;
ALTER TABLE acp_agent_kinds DROP COLUMN IF EXISTS max_tokens;
ALTER TABLE acp_agent_kinds DROP COLUMN IF EXISTS max_cost_usd;
ALTER TABLE acp_agent_kinds DROP COLUMN IF EXISTS model_id;
