diff --git a/server/src/com/cloud/upgrade/dao/Upgrade2210to2211.java b/server/src/com/cloud/upgrade/dao/Upgrade2210to2211.java new file mode 100644 index 00000000000..3ba74974b55 --- /dev/null +++ b/server/src/com/cloud/upgrade/dao/Upgrade2210to2211.java @@ -0,0 +1,65 @@ +/** + * Copyright (C) 2010 Cloud.com, Inc. All rights reserved. + * + * This software is licensed under the GNU General Public License v3 or later. + * + * It is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or any later version. + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + */ +package com.cloud.upgrade.dao; + +import java.io.File; +import java.sql.Connection; + +import org.apache.log4j.Logger; + +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.script.Script; + +public class Upgrade2210to2211 implements DbUpgrade { + final static Logger s_logger = Logger.getLogger(Upgrade2210to2211.class); + + @Override + public String[] getUpgradableVersionRange() { + return new String[] { "2.2.10", "2.2.10"}; + } + + @Override + public String getUpgradedVersion() { + return "2.2.11"; + } + + @Override + public boolean supportsRollingUpgrade() { + return true; + } + + @Override + public File[] getPrepareScripts() { + String script = Script.findScript("", "db/schema-2210to2211.sql"); + if (script == null) { + throw new CloudRuntimeException("Unable to find db/schema-2210to2211.sql"); + } + + return new File[] { new File(script) }; + } + + @Override + public void performDataMigration(Connection conn) { + } + + @Override + public File[] getCleanupScripts() { + return null; + } + +} diff --git a/setup/db/db/schema-2210to2211.sql b/setup/db/db/schema-2210to2211.sql new file mode 100644 index 00000000000..e69de29bb2d