autotasker/migrations/01_create_task_runs_table.sql

12 lines
451 B
MySQL
Raw Normal View History

2024-04-27 09:59:43 +00:00
CREATE TABLE IF NOT EXISTS task_runs (
id TEXT PRIMARY KEY,
task_id TEXT NOT NULL,
status TEXT CHECK(status IN ('pending','running','failed','success')) NOT NULL DEFAULT 'pending',
trigger_mode TEXT CHECK(status IN ('manual','webhook','schedule')) NOT NULL,
exit_code INT,
logs TEXT,
submitted_at DATETIME,
started_at DATETIME,
end_at DATETIME
)