Skip to content

Commit 123228a

Browse files
committed
fix: add Cluster Column in unique keys on ApolloConfigDB.ServerConfig
1 parent 49ee1bf commit 123228a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/sql/apolloconfigdb.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ CREATE TABLE `ServerConfig` (
383383
`DataChange_LastModifiedBy` varchar(64) DEFAULT '' COMMENT '最后修改人邮箱前缀',
384384
`DataChange_LastTime` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间',
385385
PRIMARY KEY (`Id`),
386-
UNIQUE KEY `UK_Key_DeletedAt` (`Key`,`DeletedAt`),
386+
UNIQUE KEY `UK_Key_Cluster_DeletedAt` (`Key`,`Cluster`,`DeletedAt`),
387387
KEY `DataChange_LastTime` (`DataChange_LastTime`)
388388
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='配置服务自身配置';
389389

scripts/sql/delta/v1_9_0-v1_10_0/apolloconfigdb-v1_9_0-v1_10_0-after.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,5 +75,5 @@ ALTER TABLE `Release`
7575
-- Ignore TABLE `ReleaseHistory`
7676

7777
ALTER TABLE `ServerConfig`
78-
ADD UNIQUE INDEX `UK_Key_DeletedAt` (`Key`,`DeletedAt`),
78+
ADD UNIQUE INDEX `UK_Key_Cluster_DeletedAt` (`Key`,`Cluster`,`DeletedAt`),
7979
DROP INDEX `IX_Key`;

0 commit comments

Comments
 (0)