BEGIN; CREATE TABLE IF NOT EXISTS mcp_path_checks ( id uuid PRIMARY KEY, connection_id uuid NOT NULL REFERENCES mcp_connections(id), profile_hash text NOT NULL, candidate_id text NOT NULL, status text NOT NULL CHECK(status IN ('passed','failed','unknown')), evidence jsonb NOT NULL, created_at timestamptz NOT NULL DEFAULT now() ); CREATE INDEX IF NOT EXISTS mcp_path_checks_latest ON mcp_path_checks(connection_id,profile_hash,candidate_id,created_at DESC); COMMIT;