fix: kpi granularity column update to NULL

This commit is contained in:
2024-01-23 20:15:45 +08:00
parent 413f0b4951
commit 5e4183cebc
4 changed files with 21 additions and 6 deletions

View File

@@ -145,8 +145,11 @@ ALTER TABLE `omc_db`.`sys_dict_data`
MODIFY COLUMN `dict_code` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '字典编码' FIRST;
ALTER TABLE `omc_db`.`gold_kpi`
ADD COLUMN IF NOT EXISTS `granularity` tinyint NOT NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`;
ADD COLUMN IF NOT EXISTS `granularity` tinyint DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`;
ALTER TABLE `omc_db`.`ne_info`
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`) USING BTREE;
ADD PRIMARY KEY (`id`) USING BTREE;
ALTER TABLE `omc_db`.`gold_kpi`
MODIFY COLUMN `granularity` tinyint(4) NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `date`;

View File

@@ -145,8 +145,11 @@ ALTER TABLE `omc_db`.`sys_dict_data`
MODIFY COLUMN `dict_code` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '字典编码' FIRST;
ALTER TABLE `omc_db`.`gold_kpi`
ADD COLUMN IF NOT EXISTS `granularity` tinyint NOT NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`;
ADD COLUMN IF NOT EXISTS `granularity` tinyint DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `index`;
ALTER TABLE `omc_db`.`ne_info`
DROP PRIMARY KEY,
ADD PRIMARY KEY (`id`) USING BTREE;
ADD PRIMARY KEY (`id`) USING BTREE;
ALTER TABLE `omc_db`.`gold_kpi`
MODIFY COLUMN `granularity` tinyint(4) NULL DEFAULT 60 COMMENT '时间颗粒度: 5/10/.../60/300 (秒)' AFTER `date`;