This is an automated email from the ASF dual-hosted git repository.
dahn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new dc8f4655278 engine-schema: upgrade path for 4.23.0 (#12048)
dc8f4655278 is described below
commit dc8f46552785970552094a89c430310dd09a7dd8
Author: Abhishek Kumar <[email protected]>
AuthorDate: Thu Nov 13 13:21:08 2025 +0530
engine-schema: upgrade path for 4.23.0 (#12048)
Adds a 4.22.0 to 4.23.0 upgrade path.
Signed-off-by: Abhishek Kumar <[email protected]>
---
.../com/cloud/upgrade/DatabaseUpgradeChecker.java | 8 +++---
.../com/cloud/upgrade/dao/Upgrade42200to42300.java | 30 ++++++++++++++++++++++
.../META-INF/db/schema-42200to42300-cleanup.sql | 20 +++++++++++++++
.../resources/META-INF/db/schema-42200to42300.sql | 20 +++++++++++++++
4 files changed, 75 insertions(+), 3 deletions(-)
diff --git
a/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
b/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
index c211b3e9728..ee8055f5c56 100644
--- a/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -33,11 +33,10 @@ import java.util.List;
import javax.inject.Inject;
-import com.cloud.utils.FileUtil;
import org.apache.cloudstack.utils.CloudStackVersion;
import org.apache.commons.lang3.StringUtils;
-import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
import com.cloud.upgrade.dao.DbUpgrade;
import com.cloud.upgrade.dao.DbUpgradeSystemVmTemplate;
@@ -90,9 +89,10 @@ import com.cloud.upgrade.dao.Upgrade41900to41910;
import com.cloud.upgrade.dao.Upgrade41910to42000;
import com.cloud.upgrade.dao.Upgrade42000to42010;
import com.cloud.upgrade.dao.Upgrade42010to42100;
-import com.cloud.upgrade.dao.Upgrade42100to42200;
import com.cloud.upgrade.dao.Upgrade420to421;
+import com.cloud.upgrade.dao.Upgrade42100to42200;
import com.cloud.upgrade.dao.Upgrade421to430;
+import com.cloud.upgrade.dao.Upgrade42200to42300;
import com.cloud.upgrade.dao.Upgrade430to440;
import com.cloud.upgrade.dao.Upgrade431to440;
import com.cloud.upgrade.dao.Upgrade432to440;
@@ -121,6 +121,7 @@ import com.cloud.upgrade.dao.VersionDao;
import com.cloud.upgrade.dao.VersionDaoImpl;
import com.cloud.upgrade.dao.VersionVO;
import com.cloud.upgrade.dao.VersionVO.Step;
+import com.cloud.utils.FileUtil;
import com.cloud.utils.component.SystemIntegrityChecker;
import com.cloud.utils.crypt.DBEncryptionUtil;
import com.cloud.utils.db.GlobalLock;
@@ -236,6 +237,7 @@ public class DatabaseUpgradeChecker implements
SystemIntegrityChecker {
.next("4.20.0.0", new Upgrade42000to42010())
.next("4.20.1.0", new Upgrade42010to42100())
.next("4.21.0.0", new Upgrade42100to42200())
+ .next("4.22.0.0", new Upgrade42200to42300())
.build();
}
diff --git
a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42200to42300.java
b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42200to42300.java
new file mode 100644
index 00000000000..0ea04c1a216
--- /dev/null
+++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42200to42300.java
@@ -0,0 +1,30 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you 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.
+package com.cloud.upgrade.dao;
+
+public class Upgrade42200to42300 extends DbUpgradeAbstractImpl implements
DbUpgrade, DbUpgradeSystemVmTemplate {
+
+ @Override
+ public String[] getUpgradableVersionRange() {
+ return new String[]{"4.22.0.0", "4.23.0.0"};
+ }
+
+ @Override
+ public String getUpgradedVersion() {
+ return "4.23.0.0";
+ }
+}
diff --git
a/engine/schema/src/main/resources/META-INF/db/schema-42200to42300-cleanup.sql
b/engine/schema/src/main/resources/META-INF/db/schema-42200to42300-cleanup.sql
new file mode 100644
index 00000000000..f2f5dec5003
--- /dev/null
+++
b/engine/schema/src/main/resources/META-INF/db/schema-42200to42300-cleanup.sql
@@ -0,0 +1,20 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you 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.
+
+--;
+-- Schema upgrade cleanup from 4.22.0.0 to 4.23.0.0
+--;
diff --git
a/engine/schema/src/main/resources/META-INF/db/schema-42200to42300.sql
b/engine/schema/src/main/resources/META-INF/db/schema-42200to42300.sql
new file mode 100644
index 00000000000..c1f1bb2c094
--- /dev/null
+++ b/engine/schema/src/main/resources/META-INF/db/schema-42200to42300.sql
@@ -0,0 +1,20 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you 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.
+
+--;
+-- Schema upgrade from 4.22.0.0 to 4.23.0.0
+--;