mirror of
https://github.com/simstudioai/sim.git
synced 2026-02-03 03:04:57 -05:00
* 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
7 lines
277 B
SQL
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; |