autotasker/migrations/all.sql

22 lines
758 B
MySQL
Raw Normal View History

2024-07-21 15:03:37 +00:00
DROP TABLE IF EXISTS task_runs;
CREATE TABLE task_runs (
2024-04-27 09:59:43 +00:00
id TEXT PRIMARY KEY,
task_id TEXT NOT NULL,
2024-07-26 13:00:51 +00:00
status TEXT CHECK(status IN ('Pending','Running','Failed','Success')) NOT NULL DEFAULT 'pending',
trigger_mode TEXT CHECK(trigger_mode IN ('Manual','Webhook','Schedule')) NOT NULL DEFAULT 'manual',
2024-04-27 09:59:43 +00:00
exit_code INT,
runtime_details JSON,
2024-04-27 09:59:43 +00:00
submitted_at DATETIME,
started_at DATETIME,
2024-07-21 15:03:37 +00:00
ended_at DATETIME
);
DROP TABLE IF EXISTS logs_lines;
CREATE TABLE logs_lines (
id TEXT PRIMARY KEY,
task_run_id TEXT NOT NULL,
kind TEXT CHECK(kind IN ('Stdout', 'Stderr')),
captured_at INT, -- unix timestamp
content TEXT
)