Skip to content

Commit 72a7da8

Browse files
authored
fix(migrate): 4331 migrate script may failed on ob1479 #4179
1 parent 138cd57 commit 72a7da8

File tree

3 files changed

+29
-3
lines changed

3 files changed

+29
-3
lines changed

server/integration-test/src/test/java/com/oceanbase/odc/service/integration/IntegrationServiceTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@ public void test_detail_success() {
170170
details = integrationService.detail(created.getId());
171171
Assert.assertEquals("test_detail", details.getName());
172172
Assert.assertEquals(IntegrationType.SQL_INTERCEPTOR, details.getType());
173+
Assert.assertNotNull(details.getEncryption().getSecret());
173174
}
174175

175176
@Test
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024 OceanBase.
2+
* Copyright (c) 2025 OceanBase.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -13,5 +13,6 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
17-
alter table `integration_integration` modify column `secret` mediumtext DEFAULT null;
16+
ALTER TABLE `integration_integration` ALTER COLUMN `secret` RENAME TO `secret_old`;
17+
ALTER TABLE `integration_integration` ADD COLUMN `secret` MEDIUMTEXT;
18+
update `integration_integration` set `secret` = `secret_old`;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2025 OceanBase.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
18+
ALTER TABLE `integration_integration` CHANGE COLUMN `secret` `secret_old` VARCHAR(512);
19+
ALTER TABLE `integration_integration` ADD COLUMN `secret` MEDIUMTEXT;
20+
update `integration_integration` set `secret` = `secret_old`;
21+
22+
23+
24+

0 commit comments

Comments
 (0)