CREATE TABLE `history_log` (
`id` BIGINT(20) UNSIGNED NOT NULL,
`itemid` BIGINT(20) UNSIGNED NOT NULL,
`clock` INT(11) NOT NULL DEFAULT '0',
`timestamp` INT(11) NOT NULL DEFAULT '0',
`source` VARCHAR(64) NOT NULL DEFAULT '',
`severity` INT(11) NOT NULL DEFAULT '0',
`value` TEXT NOT NULL,
`logeventid` INT(11) NOT NULL DEFAULT '0',
`ns` INT(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE INDEX `history_log_2` (`itemid`, `id`),
INDEX `history_log_1` (`itemid`, `clock`)
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;