Skip to content

Commit dc8f465

Browse files
authored
engine-schema: upgrade path for 4.23.0 (apache#12048)
Adds a 4.22.0 to 4.23.0 upgrade path. Signed-off-by: Abhishek Kumar <[email protected]>
1 parent f985a67 commit dc8f465

File tree

4 files changed

+75
-3
lines changed

4 files changed

+75
-3
lines changed

engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,10 @@
3333

3434
import javax.inject.Inject;
3535

36-
import com.cloud.utils.FileUtil;
3736
import org.apache.cloudstack.utils.CloudStackVersion;
3837
import org.apache.commons.lang3.StringUtils;
39-
import org.apache.logging.log4j.Logger;
4038
import org.apache.logging.log4j.LogManager;
39+
import org.apache.logging.log4j.Logger;
4140

4241
import com.cloud.upgrade.dao.DbUpgrade;
4342
import com.cloud.upgrade.dao.DbUpgradeSystemVmTemplate;
@@ -90,9 +89,10 @@
9089
import com.cloud.upgrade.dao.Upgrade41910to42000;
9190
import com.cloud.upgrade.dao.Upgrade42000to42010;
9291
import com.cloud.upgrade.dao.Upgrade42010to42100;
93-
import com.cloud.upgrade.dao.Upgrade42100to42200;
9492
import com.cloud.upgrade.dao.Upgrade420to421;
93+
import com.cloud.upgrade.dao.Upgrade42100to42200;
9594
import com.cloud.upgrade.dao.Upgrade421to430;
95+
import com.cloud.upgrade.dao.Upgrade42200to42300;
9696
import com.cloud.upgrade.dao.Upgrade430to440;
9797
import com.cloud.upgrade.dao.Upgrade431to440;
9898
import com.cloud.upgrade.dao.Upgrade432to440;
@@ -121,6 +121,7 @@
121121
import com.cloud.upgrade.dao.VersionDaoImpl;
122122
import com.cloud.upgrade.dao.VersionVO;
123123
import com.cloud.upgrade.dao.VersionVO.Step;
124+
import com.cloud.utils.FileUtil;
124125
import com.cloud.utils.component.SystemIntegrityChecker;
125126
import com.cloud.utils.crypt.DBEncryptionUtil;
126127
import com.cloud.utils.db.GlobalLock;
@@ -236,6 +237,7 @@ public DatabaseUpgradeChecker() {
236237
.next("4.20.0.0", new Upgrade42000to42010())
237238
.next("4.20.1.0", new Upgrade42010to42100())
238239
.next("4.21.0.0", new Upgrade42100to42200())
240+
.next("4.22.0.0", new Upgrade42200to42300())
239241
.build();
240242
}
241243

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
package com.cloud.upgrade.dao;
18+
19+
public class Upgrade42200to42300 extends DbUpgradeAbstractImpl implements DbUpgrade, DbUpgradeSystemVmTemplate {
20+
21+
@Override
22+
public String[] getUpgradableVersionRange() {
23+
return new String[]{"4.22.0.0", "4.23.0.0"};
24+
}
25+
26+
@Override
27+
public String getUpgradedVersion() {
28+
return "4.23.0.0";
29+
}
30+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Licensed to the Apache Software Foundation (ASF) under one
2+
-- or more contributor license agreements. See the NOTICE file
3+
-- distributed with this work for additional information
4+
-- regarding copyright ownership. The ASF licenses this file
5+
-- to you under the Apache License, Version 2.0 (the
6+
-- "License"); you may not use this file except in compliance
7+
-- with the License. You may obtain a copy of the License at
8+
--
9+
-- http://www.apache.org/licenses/LICENSE-2.0
10+
--
11+
-- Unless required by applicable law or agreed to in writing,
12+
-- software distributed under the License is distributed on an
13+
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
-- KIND, either express or implied. See the License for the
15+
-- specific language governing permissions and limitations
16+
-- under the License.
17+
18+
--;
19+
-- Schema upgrade cleanup from 4.22.0.0 to 4.23.0.0
20+
--;
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
-- Licensed to the Apache Software Foundation (ASF) under one
2+
-- or more contributor license agreements. See the NOTICE file
3+
-- distributed with this work for additional information
4+
-- regarding copyright ownership. The ASF licenses this file
5+
-- to you under the Apache License, Version 2.0 (the
6+
-- "License"); you may not use this file except in compliance
7+
-- with the License. You may obtain a copy of the License at
8+
--
9+
-- http://www.apache.org/licenses/LICENSE-2.0
10+
--
11+
-- Unless required by applicable law or agreed to in writing,
12+
-- software distributed under the License is distributed on an
13+
-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
-- KIND, either express or implied. See the License for the
15+
-- specific language governing permissions and limitations
16+
-- under the License.
17+
18+
--;
19+
-- Schema upgrade from 4.22.0.0 to 4.23.0.0
20+
--;

0 commit comments

Comments
 (0)