Files
sim/packages/db/migrations/0132_dazzling_leech.sql
Vikhyath Mondreti 8c89507247 improvement(logs): state machine of workflow execution (#2560)
* improvement(logs): state machine of workflow execution

* cleanup more code

* fallback consistency

* fix labels

* backfill in migration correctly

* make streaming stop in chat window correctly
2025-12-23 18:27:19 -08:00

7 lines
277 B
SQL

ALTER TABLE "workflow_execution_logs" ADD COLUMN "status" text DEFAULT 'running' NOT NULL;--> statement-breakpoint
UPDATE "workflow_execution_logs"
SET "status" = CASE
WHEN "level" = 'error' THEN 'failed'
WHEN "ended_at" IS NOT NULL THEN 'completed'
ELSE 'running'
END;