Skip to content

Commit

Permalink
fix: add Cluster Column in unique keys on ApolloConfigDB.ServerConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
nisiyong committed Nov 17, 2021
1 parent 04b3568 commit 81a3733
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/sql/apolloconfigdb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ CREATE TABLE `ServerConfig` (
`DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀',
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
PRIMARY KEY (`Id`),
UNIQUE KEY `UK_Key_DeletedAt` (`Key`,`DeletedAt`),
UNIQUE KEY `UK_Key_Cluster_DeletedAt` (`Key`,`Cluster`,`DeletedAt`),
KEY `DataChange_LastTime` (`DataChange_LastTime`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,5 +75,5 @@ ALTER TABLE `Release`
-- Ignore TABLE `ReleaseHistory`

ALTER TABLE `ServerConfig`
ADD UNIQUE INDEX `UK_Key_DeletedAt` (`Key`,`DeletedAt`),
ADD UNIQUE INDEX `UK_Key_Cluster_DeletedAt` (`Key`,`Cluster`,`DeletedAt`),
DROP INDEX `IX_Key`;

0 comments on commit 81a3733

Please sign in to comment.