kaiyu
2020-11-19 0e6ed51eb2150d18749fd54453f4fc827a87b1a5
src/main/resources/mapper/HistoryMapper.xml
@@ -247,4 +247,16 @@
    <update id="deletePartition">
        ALTER table history drop PARTITION ${p};
    </update>
    <update id="createHistoryTable" parameterType="String">
        CREATE TABLE history_${yearMonthDay} (
        `mac` varchar(20) DEFAULT NULL,
        `value` json DEFAULT NULL,
        `time` datetime DEFAULT NULL,
        `version` int(11) DEFAULT NULL,
        KEY `_idx_mac_time` (`mac`,`time`) USING BTREE,
        KEY `_idx_mac` (`mac`) USING BTREE,
        KEY `_idx_time` (`time`) USING BTREE
        ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC
    </update>
</mapper>