`refType` enum('alert','policy') NOT NULL, `refId` bigint(20) unsigned NOT NULL, `timeStamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `endTimeStamp` timestamp NULL DEFAULT NULL, `layoutId` bigint(20) unsigned DEFAULT NULL, `cabinetId` bigint(20) unsigned DEFAULT NULL, `nodeId` bigint(20) unsigned DEFAULT NULL, `channelId` mediumint(8) DEFAULT NULL, `value` double NOT NULL, PRIMARY KEY (`historyId`,`timeStamp`), KEY `refId` (`refId`,`refType`), KEY `cabinetId` (`cabinetId`), KEY `nodeId` (`nodeId`) ) ENGINE=InnoDB PARTITION BY RANGE ( UNIX_TIMESTAMP(`timeStamp`)) (PARTITION p2015 VALUES LESS THAN (1451606400) PARTITION p2016 VALUES LESS THAN (1483228800) PARTITION p2017 VALUES LESS THAN (1514764800) PARTITION p2018 VALUES LESS THAN (1546300800) PARTITION p2019 VALUES LESS THAN (1577836800) PARTITION p2020 VALUES LESS THAN (1609459200)