CREATE TABLE IF NOT EXISTS `util`.`vn_schedules` ( `id` int(11) NOT NULL AUTO_INCREMENT, `started` datetime DEFAULT NULL, `finished` datetime DEFAULT NULL, `lastFinished` datetime DEFAULT NULL, `order` int(11) DEFAULT NULL, `schema` varchar(45) NOT NULL, `procedure` varchar(100) NOT NULL, `error` varchar(255) DEFAULT NULL, `errorCode` varchar(10) DEFAULT NULL, `status` enum('scheduled','exec','error') NOT NULL DEFAULT 'scheduled', PRIMARY KEY (`id`), UNIQUE KEY unique_schedule (`schema`, `procedure`, `status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;