bug 11316: In 2.2.11, removed new template upgrade changes. Added upgrade path from 2210 to 2211.

status 1316: resolved fixed
This commit is contained in:
kishan 2011-08-31 14:46:35 +05:30
parent 1d04b60dea
commit 647c774c03
2 changed files with 65 additions and 0 deletions

View File

@ -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 <http://www.gnu.org/licenses/>.
*
*/
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;
}
}

View File