bug CS-16281: Add 2.2.14 to 2.2.15 upgrade path

status CS-16281: resolved fixed
reviewed-by: Abhi
This commit is contained in:
Kishan Kavala 2012-09-06 14:30:13 +05:30
parent 423439f16a
commit 27de7bb9fa
2 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,59 @@
// Copyright 2012 Citrix Systems, Inc. Licensed under the
// Apache License, Version 2.0 (the "License"); you may not use this
// file except in compliance with the License. Citrix Systems, Inc.
// reserves all rights not expressly granted by 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;
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 Upgrade2214to2215 implements DbUpgrade {
final static Logger s_logger = Logger.getLogger(Upgrade2214to2215.class);
@Override
public String[] getUpgradableVersionRange() {
return new String[] { "2.2.14", "2.2.15"};
}
@Override
public String getUpgradedVersion() {
return "2.2.15";
}
@Override
public boolean supportsRollingUpgrade() {
return true;
}
@Override
public File[] getPrepareScripts() {
String script = Script.findScript("", "db/schema-2214to2215.sql");
if (script == null) {
throw new CloudRuntimeException("Unable to find db/schema-2214to2215.sql");
}
return new File[] { new File(script) };
}
@Override
public void performDataMigration(Connection conn) {
}
@Override
public File[] getCleanupScripts() {
return null;
}
}

View File

@ -0,0 +1,3 @@
--;
-- Schema upgrade from 2.2.14 to 2.2.15;
--;