diff --git a/server/src/com/cloud/upgrade/dao/Upgrade2214to2215.java b/server/src/com/cloud/upgrade/dao/Upgrade2214to2215.java new file mode 100644 index 00000000000..a3a16cc1080 --- /dev/null +++ b/server/src/com/cloud/upgrade/dao/Upgrade2214to2215.java @@ -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; + } + } diff --git a/setup/db/db/schema-2214to2215.sql b/setup/db/db/schema-2214to2215.sql new file mode 100644 index 00000000000..a1a68d4f70c --- /dev/null +++ b/setup/db/db/schema-2214to2215.sql @@ -0,0 +1,3 @@ +--; +-- Schema upgrade from 2.2.14 to 2.2.15; +--; \ No newline at end of file