-- Add red team flag to tasks
ALTER TABLE tasks
ADD COLUMN is_red_team BOOLEAN NOT NULL DEFAULT FALSE;

-- Index for efficient red team task lookup per contract
CREATE INDEX idx_tasks_contract_red_team ON tasks(contract_id, is_red_team)
WHERE is_red_team = TRUE;

COMMENT ON COLUMN tasks.is_red_team IS 'Whether this is a red team monitoring task';
