Skip to content

Commit

Permalink
Add index for table ReleaseHistory (#4550)
Browse files Browse the repository at this point in the history
* add index for table ReleaseHistory

* update CHANGES.md

* add delta SQL
  • Loading branch information
mghio authored Sep 5, 2022
1 parent 2662f03 commit 85bc77d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Apollo 2.1.0
* [fix the deleted at timestamp issue](https://github.com/apolloconfig/apollo/pull/4493)
* [add configuration processor for portal developers](https://github.com/apolloconfig/apollo/pull/4521)
* [Add a potential json value check feature](https://github.com/apolloconfig/apollo/pull/4519)
* [Add index for table ReleaseHistory](https://github.com/apolloconfig/apollo/pull/4550)

------------------
All issues and pull requests are [here](https://github.com/apolloconfig/apollo/milestone/11?closed=1)
3 changes: 2 additions & 1 deletion scripts/sql/apolloconfigdb.sql
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,8 @@ CREATE TABLE `ReleaseHistory` (
PRIMARY KEY (`Id`),
KEY `IX_Namespace` (`AppId`,`ClusterName`,`NamespaceName`,`BranchName`),
KEY `IX_ReleaseId` (`ReleaseId`),
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`)
KEY `IX_DataChange_LastTime` (`DataChange_LastTime`),
KEY `IX_PreviousReleaseId` (`PreviousReleaseId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='发布历史';


Expand Down
21 changes: 21 additions & 0 deletions scripts/sql/delta/v200-v210/apolloconfigdb-v200-v210.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--
-- Copyright 2022 Apollo Authors
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
# delta schema to upgrade apollo config db from v2.0.0 to v2.1.0

Use ApolloConfigDB;

-- add INDEX for ReleaseHistory table
CREATE INDEX IX_PreviousReleaseId ON ReleaseHistory(PreviousReleaseId);

0 comments on commit 85bc77d

Please sign in to comment.