-- 该语句在业务系统和计算服务都要执行：

ALTER TABLE `AR_PERIOD` 
ADD COLUMN `CALC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT;

-- 在业务系统增加一个计算历史表

CREATE TABLE `AR_CALC_OPERATION` (
  `ID` varchar(32) COLLATE utf8mb4_bin NOT NULL,
  `CALC_ID` varchar(32) COLLATE utf8mb4_bin NOT NULL,
  `ADMIN_ID` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL,
  `PERIOD_NUM` int(11) NOT NULL,
  `START_TIME` int(11) NOT NULL,
  `END_TIME` int(11) DEFAULT NULL,
  `STATUS` tinyint(2) NOT NULL DEFAULT 0,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;