提交 03f81bc6 编写于 作者: S shizeying 提交者: EricZeng

[Bugfix]删除idx_cluster_phy_id 索引并新增idx_cluster_update_time索引(#918)

上级 eed9571f
......@@ -56,6 +56,11 @@ CREATE TABLE `ks_ha_active_standby_relation` (
UNIQUE KEY `uniq_cluster_res` (`res_type`,`active_cluster_phy_id`,`standby_cluster_phy_id`,`res_name`),
UNIQUE KEY `uniq_res_type_standby_cluster_res_name` (`res_type`,`standby_cluster_phy_id`,`res_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='HA主备关系表';
-- 删除idx_cluster_phy_id 索引并新增idx_cluster_update_time索引
ALTER TABLE `ks_km_kafka_change_record` DROP INDEX `idx_cluster_phy_id` ,
ADD INDEX `idx_cluster_update_time` (`cluster_phy_id` ASC, `update_time` ASC);
```
### 升级至 `3.2.0` 版本
......
......@@ -196,7 +196,7 @@ CREATE TABLE `ks_km_kafka_change_record` (
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
PRIMARY KEY (`id`),
UNIQUE KEY `unique_field` (`unique_field`),
KEY `idx_cluster_phy_id` (`cluster_phy_id`)
KEY `idx_cluster_update_time` (`cluster_phy_id` ASC, `update_time` ASC)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Kafka变更记录表';
......@@ -480,4 +480,4 @@ CREATE TABLE `ks_ha_active_standby_relation` (
PRIMARY KEY (`id`),
UNIQUE KEY `uniq_cluster_res` (`res_type`,`active_cluster_phy_id`,`standby_cluster_phy_id`,`res_name`),
UNIQUE KEY `uniq_res_type_standby_cluster_res_name` (`res_type`,`standby_cluster_phy_id`,`res_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='HA主备关系表';
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='HA主备关系表';
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册