-- Track execution status of each AI prompt run for concurrency safety
ALTER TABLE prompt_runs
    ADD COLUMN status VARCHAR(20) NOT NULL DEFAULT 'done'
        COMMENT 'pending|running|done|failed',
    ADD COLUMN started_at DATETIME NULL DEFAULT NULL,
    ADD INDEX idx_ppr_status (status),
    ADD INDEX idx_ppr_prompt_status (prompt_id, status);
