CREATE TABLE TaskLog (
    id VARCHAR(191) NOT NULL, queueName VARCHAR(64) NOT NULL, jobId VARCHAR(100) NOT NULL,
    status VARCHAR(16) NOT NULL DEFAULT 'enqueued', payload JSON,
    error TEXT, attempts INT NOT NULL DEFAULT 0,
    createdAt DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
    updatedAt DATETIME(3) NOT NULL,
    INDEX TaskLog_queueName_idx(queueName), INDEX TaskLog_status_idx(status),
    INDEX TaskLog_createdAt_idx(createdAt), PRIMARY KEY (id)
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
