Files
GitHop/services/control-plane/internal/store/migrations/002_prompts.sql
T
Hop fee4f6dd31 Add a secure repository Prompts review surface and prompt metadata API
Hop-State: A_06FN6MRSHG4B64ZV13086G8
Hop-Proposal: R_06FN6MQDE14FFNR65H1D28G
Hop-Task: T_06FN6J8ECE1Z9XQ5PQ3Z3D8
Hop-Attempt: AT_06FN6J8ECC1SC794JMZ0TF8
2026-07-11 15:36:22 -07:00

18 lines
736 B
SQL

CREATE TABLE prompts (
id text PRIMARY KEY,
repository_id text NOT NULL REFERENCES repositories(id) ON DELETE CASCADE,
task_id text NOT NULL DEFAULT '',
attempt_id text NOT NULL DEFAULT '',
state_id text NOT NULL DEFAULT '',
prompt text NOT NULL,
agent_name text NOT NULL DEFAULT '',
agent_model text NOT NULL DEFAULT '',
status text NOT NULL DEFAULT 'running' CHECK (status IN ('running', 'completed', 'failed', 'cancelled')),
response_summary text NOT NULL DEFAULT '',
metadata jsonb NOT NULL DEFAULT '{}'::jsonb,
created_at timestamptz NOT NULL DEFAULT now(),
completed_at timestamptz
);
CREATE INDEX prompts_repository_created_at_idx ON prompts (repository_id, created_at DESC);