Files
next-tjwater-server/resources/sql/030_operational_run_agent_ownership.sql
T
jiang 05183aff93
Generic Container CI/CD / test-build-publish (push) Successful in 3m53s
Server CI/CD v2 / build-test-publish-and-deploy (push) Successful in 3m52s
feat: extend operational investigation workflows
2026-10-30 17:30:19 +08:00

14 lines
437 B
PL/PgSQL

-- Bind durable task runs to the Agent instance that owns their local session.
BEGIN;
ALTER TABLE workbench.operational_task_runs
ADD COLUMN IF NOT EXISTS agent_instance_id text;
CREATE INDEX IF NOT EXISTS operational_task_runs_agent_owner_idx
ON workbench.operational_task_runs(project_id,agent_instance_id,status,created_at,run_id)
WHERE agent_instance_id IS NOT NULL
AND status IN ('claimed','running');
COMMIT;