Skip to content

Commit

Permalink
upgrade: move 4.19.0->4.20.0 to 4.19.1->4.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
weizhouapache committed Apr 8, 2024
1 parent 2959cc6 commit 9bd4f1e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

import javax.inject.Inject;

import com.cloud.upgrade.dao.Upgrade41900to42000;
import com.cloud.utils.FileUtil;
import org.apache.cloudstack.utils.CloudStackVersion;
import org.apache.commons.lang3.StringUtils;
Expand Down Expand Up @@ -87,6 +86,8 @@
import com.cloud.upgrade.dao.Upgrade41720to41800;
import com.cloud.upgrade.dao.Upgrade41800to41810;
import com.cloud.upgrade.dao.Upgrade41810to41900;
import com.cloud.upgrade.dao.Upgrade41900to41910;
import com.cloud.upgrade.dao.Upgrade41910to42000;
import com.cloud.upgrade.dao.Upgrade420to421;
import com.cloud.upgrade.dao.Upgrade421to430;
import com.cloud.upgrade.dao.Upgrade430to440;
Expand Down Expand Up @@ -226,7 +227,8 @@ public DatabaseUpgradeChecker() {
.next("4.17.2.0", new Upgrade41720to41800())
.next("4.18.0.0", new Upgrade41800to41810())
.next("4.18.1.0", new Upgrade41810to41900())
.next("4.19.0.0", new Upgrade41900to42000())
.next("4.19.0.0", new Upgrade41900to41910())
.next("4.19.1.0", new Upgrade41910to42000())
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@
import com.cloud.upgrade.SystemVmTemplateRegistration;
import com.cloud.utils.exception.CloudRuntimeException;

public class Upgrade41900to42000 extends DbUpgradeAbstractImpl implements DbUpgrade, DbUpgradeSystemVmTemplate {
public class Upgrade41910to42000 extends DbUpgradeAbstractImpl implements DbUpgrade, DbUpgradeSystemVmTemplate {
private SystemVmTemplateRegistration systemVmTemplateRegistration;

@Override
public String[] getUpgradableVersionRange() {
return new String[] {"4.19.0.0", "4.20.0.0"};
return new String[] {"4.19.1.0", "4.20.0.0"};
}

@Override
Expand All @@ -42,7 +42,7 @@ public boolean supportsRollingUpgrade() {

@Override
public InputStream[] getPrepareScripts() {
final String scriptFile = "META-INF/db/schema-41900to42000.sql";
final String scriptFile = "META-INF/db/schema-41910to42000.sql";
final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile);
if (script == null) {
throw new CloudRuntimeException("Unable to find " + scriptFile);
Expand All @@ -57,7 +57,7 @@ public void performDataMigration(Connection conn) {

@Override
public InputStream[] getCleanupScripts() {
final String scriptFile = "META-INF/db/schema-41900to42000-cleanup.sql";
final String scriptFile = "META-INF/db/schema-41910to42000-cleanup.sql";
final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile);
if (script == null) {
throw new CloudRuntimeException("Unable to find " + scriptFile);
Expand Down

0 comments on commit 9bd4f1e

Please sign in to comment.