CREATE TABLE IF NOT EXISTS qt_scheduler_runs (
    job_name VARCHAR(100) NOT NULL,
    last_started_at DATETIME NULL,
    last_finished_at DATETIME NULL,
    last_status VARCHAR(20) NOT NULL DEFAULT 'idle',
    last_error TEXT NULL,
    updated_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    PRIMARY KEY (job_name)
);
