cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject [2/3] git commit: updated refs/heads/master to a265d7b
Date Wed, 29 Oct 2014 16:00:08 GMT
Add database upgrade from 4.5.0 to 4.6.0


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/cf5b56d6
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/cf5b56d6
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/cf5b56d6

Branch: refs/heads/master
Commit: cf5b56d617f8f0f0891d80ddeb84d4b59e2cddb4
Parents: 4ebaf0a
Author: Hugo Trippaers <htrippaers@schubergphilis.com>
Authored: Wed Oct 29 14:53:02 2014 +0100
Committer: Hugo Trippaers <htrippaers@schubergphilis.com>
Committed: Wed Oct 29 15:03:19 2014 +0100

----------------------------------------------------------------------
 .../cloud/upgrade/DatabaseUpgradeChecker.java   | 192 +++++++++++--------
 .../com/cloud/upgrade/dao/Upgrade450to460.java  |  71 +++++++
 setup/db/db/schema-450to460-cleanup.sql         |  21 ++
 setup/db/db/schema-450to460.sql                 |  20 ++
 4 files changed, 221 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf5b56d6/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
index 34d3bdf..cba6b83 100755
--- a/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
+++ b/engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
@@ -69,6 +69,7 @@ import com.cloud.upgrade.dao.Upgrade430to440;
 import com.cloud.upgrade.dao.Upgrade431to440;
 import com.cloud.upgrade.dao.Upgrade440to441;
 import com.cloud.upgrade.dao.Upgrade441to450;
+import com.cloud.upgrade.dao.Upgrade450to460;
 import com.cloud.upgrade.dao.UpgradeSnapshot217to224;
 import com.cloud.upgrade.dao.UpgradeSnapshot223to224;
 import com.cloud.upgrade.dao.VersionDao;
@@ -94,155 +95,180 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker
{
         _dao = new VersionDaoImpl();
 
         _upgradeMap.put("2.1.7", new DbUpgrade[] {new Upgrade217to218(), new Upgrade218to22(),
new Upgrade221to222(),
-            new UpgradeSnapshot217to224(), new Upgrade222to224(), new Upgrade224to225(),
new Upgrade225to226(),
-            new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(),
-            new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(), new
Upgrade2214to30(),
-            new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new UpgradeSnapshot217to224(), new Upgrade222to224(), new Upgrade224to225(),
new Upgrade225to226(),
+                new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new
Upgrade2210to2211(),
+                new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
new Upgrade2214to30(),
+                new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(),
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new
Upgrade440to441(),
+                new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.1.8", new DbUpgrade[] {new Upgrade218to22(), new Upgrade221to222(),
new UpgradeSnapshot217to224(),
-            new Upgrade222to224(), new Upgrade218to224DomainVlans(), new Upgrade224to225(),
new Upgrade225to226(),
-            new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(),
-            new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
-            new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-            new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade222to224(), new Upgrade218to224DomainVlans(), new Upgrade224to225(),
new Upgrade225to226(),
+                new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new
Upgrade2210to2211(),
+                new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
+                new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
+                new Upgrade421to430(), new Upgrade430to440(),
+                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.1.9", new DbUpgrade[] {new Upgrade218to22(), new Upgrade221to222(),
new UpgradeSnapshot217to224(),
-            new Upgrade222to224(), new Upgrade218to224DomainVlans(), new Upgrade224to225(),
new Upgrade225to226(),
-            new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(),
-            new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(), new
Upgrade2214to30(),
-            new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade222to224(), new Upgrade218to224DomainVlans(), new Upgrade224to225(),
new Upgrade225to226(),
+                new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(), new
Upgrade2210to2211(),
+                new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
new Upgrade2214to30(),
+                new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(),
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
+                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.1", new DbUpgrade[] {new Upgrade221to222(), new UpgradeSnapshot223to224(),
new Upgrade222to224(),
-            new Upgrade224to225(), new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(),
-            new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(), new
Upgrade2212to2213(),
-            new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(),
new Upgrade302to40(), new Upgrade40to41(),
-            new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade224to225(), new Upgrade225to226(), new Upgrade227to228(), new
Upgrade228to229(),
+                new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(),
new Upgrade2212to2213(),
+                new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new
Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
+                new Upgrade410to420(),
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new
Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.2", new DbUpgrade[] {new Upgrade222to224(), new UpgradeSnapshot223to224(),
new Upgrade224to225(),
-            new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(),
-            new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(), new
Upgrade2213to2214(),
-            new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-            new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(), new
Upgrade229to2210(),
+                new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
new Upgrade2213to2214(),
+                new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new
Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.3", new DbUpgrade[] {new Upgrade222to224(), new UpgradeSnapshot223to224(),
new Upgrade224to225(),
-            new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(), new Upgrade229to2210(),
-            new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(), new
Upgrade2213to2214(),
-            new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-            new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade225to226(), new Upgrade227to228(), new Upgrade228to229(), new
Upgrade229to2210(),
+                new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
new Upgrade2213to2214(),
+                new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new
Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.4", new DbUpgrade[] {new Upgrade224to225(), new Upgrade225to226(),
new Upgrade227to228(),
-            new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(),
-            new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(), new
Upgrade30to301(),
-            new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade228to229(), new Upgrade229to2210(), new Upgrade2210to2211(), new
Upgrade2211to2212(),
+                new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(),
new Upgrade30to301(),
+                new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
+                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.5", new DbUpgrade[] {new Upgrade225to226(), new Upgrade227to228(),
new Upgrade228to229(),
-            new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(), new
Upgrade2212to2213(),
-            new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(),
-            new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade229to2210(), new Upgrade2210to2211(), new Upgrade2211to2212(),
new Upgrade2212to2213(),
+                new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new
Upgrade301to302(),
+                new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
+                new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.6", new DbUpgrade[] {new Upgrade227to228(), new Upgrade228to229(),
new Upgrade229to2210(),
-            new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(), new
Upgrade2213to2214(),
-            new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-            new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
new Upgrade2213to2214(),
+                new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new
Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.7", new DbUpgrade[] {new Upgrade227to228(), new Upgrade228to229(),
new Upgrade229to2210(),
-            new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
-            new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(),
new Upgrade302to40(), new Upgrade40to41(),
-            new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade2210to2211(), new Upgrade2211to2212(), new Upgrade2212to2213(),
+                new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new
Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
+                new Upgrade410to420(),
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new
Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.8", new DbUpgrade[] {new Upgrade228to229(), new Upgrade229to2210(),
new Upgrade2210to2211(),
-            new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(), new
Upgrade2214to30()
-            , new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(), new Upgrade420to421(),
-            new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade2211to2212(), new Upgrade2212to2213(), new Upgrade2213to2214(),
new Upgrade2214to30()
+        , new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(), new Upgrade420to421(),
+        new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(),
new Upgrade450to460()});
 
         _upgradeMap.put("2.2.9", new DbUpgrade[] {new Upgrade229to2210(), new Upgrade2210to2211(),
new Upgrade2211to2212(),
-            new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(), new
Upgrade30to301(),
-            new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade2212to2213(), new Upgrade2213to2214(), new Upgrade2214to30(),
new Upgrade30to301(),
+                new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(),
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new
Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.10", new DbUpgrade[] {new Upgrade2210to2211(), new Upgrade2211to2212(),
new Upgrade2212to2213(),
-            new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(),
new Upgrade302to40(), new Upgrade40to41(),
-            new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade2213to2214(), new Upgrade2214to30(), new Upgrade30to301(), new
Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
+                new Upgrade410to420(),
+                new Upgrade420to421(), new Upgrade421to430(),
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new
Upgrade450to460()});
 
         _upgradeMap.put("2.2.10", new DbUpgrade[] {new Upgrade2210to2211(), new Upgrade2211to2212(),
new Upgrade2212to2213(), new Upgrade2213to2214(),
-            new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-            new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade2214to30(), new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
+                new Upgrade421to430(),
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new
Upgrade450to460()});
 
         _upgradeMap.put("2.2.12", new DbUpgrade[] {new Upgrade2212to2213(), new Upgrade2213to2214(),
new Upgrade2214to30(),
-            new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
-            new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
+                new Upgrade430to440(), new Upgrade440to441(),
+                new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.13", new DbUpgrade[] {new Upgrade2213to2214(), new Upgrade2214to30(),
new Upgrade30to301(),
-            new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade301to302(), new Upgrade302to40(),
+                new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(),
+                new Upgrade450to460()});
 
         _upgradeMap.put("2.2.14", new DbUpgrade[] {new Upgrade2214to30(), new Upgrade30to301(),
new Upgrade301to302(),
-            new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade302to40(), new Upgrade40to41(),
+                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new
Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.13", new DbUpgrade[] {new Upgrade2213to2214(), new Upgrade2214to30(),
new Upgrade30to301(), new Upgrade301to302(), new Upgrade302to40(),
-                new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.14", new DbUpgrade[] {new Upgrade2214to30(), new Upgrade30to301(),
new Upgrade301to302(), new Upgrade302to40(), new Upgrade40to41(),
-                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new
Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new
Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.0", new DbUpgrade[] {new Upgrade30to301(), new Upgrade301to302(),
new Upgrade302to40(), new Upgrade40to41(), new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new
Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.1", new DbUpgrade[] {new Upgrade301to302(), new Upgrade302to40(),
new Upgrade40to41(), new Upgrade410to420(), new Upgrade420to421(),
-            new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new
Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.2", new DbUpgrade[] {new Upgrade302to40(), new Upgrade40to41(),
new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
-            new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
 
-        _upgradeMap.put("4.0.0", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+        _upgradeMap.put("4.0.0", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
+                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.0.1", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+        _upgradeMap.put("4.0.1", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
+                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.0.2", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+        _upgradeMap.put("4.0.2", new DbUpgrade[] {new Upgrade40to41(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
+                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.1.0", new DbUpgrade[] {new Upgrade410to420(), new Upgrade420to421(),
new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+        _upgradeMap.put("4.1.0", new DbUpgrade[] {new Upgrade410to420(), new Upgrade420to421(),
new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
+                new Upgrade441to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.1.1", new DbUpgrade[] {new Upgrade410to420(), new Upgrade420to421(),
new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+        _upgradeMap.put("4.1.1", new DbUpgrade[] {new Upgrade410to420(), new Upgrade420to421(),
new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
+                new Upgrade441to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.2.0", new DbUpgrade[] {new Upgrade420to421(), new Upgrade421to430(),
new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+        _upgradeMap.put("4.2.0", new DbUpgrade[] {new Upgrade420to421(), new Upgrade421to430(),
new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(),
+                new Upgrade450to460()});
 
-        _upgradeMap.put("4.2.1", new DbUpgrade[] {new Upgrade421to430(), new Upgrade430to440(),
new Upgrade440to441(), new Upgrade441to450()});
+        _upgradeMap.put("4.2.1", new DbUpgrade[] {new Upgrade421to430(), new Upgrade430to440(),
new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.3.0", new DbUpgrade[] {new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+        _upgradeMap.put("4.3.0", new DbUpgrade[] {new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.3.1", new DbUpgrade[] {new Upgrade431to440(), new Upgrade440to441(),
new Upgrade441to450()});
+        _upgradeMap.put("4.3.1", new DbUpgrade[] {new Upgrade431to440(), new Upgrade440to441(),
new Upgrade441to450(), new Upgrade450to460()});
 
-        _upgradeMap.put("4.4.0", new DbUpgrade[] {new Upgrade440to441(), new Upgrade441to450()});
+        _upgradeMap.put("4.4.0", new DbUpgrade[] {new Upgrade440to441(), new Upgrade441to450(),
new Upgrade450to460()});
 
-        _upgradeMap.put("4.4.1", new DbUpgrade[] { new Upgrade441to450() });
+        _upgradeMap.put("4.4.1", new DbUpgrade[] {new Upgrade441to450(), new Upgrade450to460()});
+
+        _upgradeMap.put("4.5.0", new DbUpgrade[] {new Upgrade450to460()});
 
         //CP Upgrades
         _upgradeMap.put("3.0.3", new DbUpgrade[] {new Upgrade303to304(), new Upgrade304to305(),
new Upgrade305to306(), new Upgrade306to307(), new Upgrade307to410(),
-            new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
new Upgrade440to441(), new Upgrade441to450(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(), new
Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade440to441(),
+                new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.4", new DbUpgrade[] {new Upgrade304to305(), new Upgrade305to306(),
new Upgrade306to307(), new Upgrade307to410(), new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new
Upgrade440to441(), new Upgrade441to450(), new Upgrade440to441(), new Upgrade441to450(),
+                new Upgrade450to460()});
 
         _upgradeMap.put("3.0.5", new DbUpgrade[] {new Upgrade305to306(), new Upgrade306to307(),
new Upgrade307to410(), new Upgrade410to420(), new Upgrade420to421(),
-            new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(),
new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(), new
Upgrade441to450(), new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("3.0.6", new DbUpgrade[] {new Upgrade306to307(), new Upgrade307to410(),
new Upgrade410to420(), new Upgrade420to421(), new Upgrade421to430(),
-            new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450()});
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new
Upgrade450to460()});
 
-        _upgradeMap.put("3.0.7", new DbUpgrade[] {new Upgrade307to410(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+        _upgradeMap.put("3.0.7", new DbUpgrade[] {new Upgrade307to410(), new Upgrade410to420(),
new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(),
+                new Upgrade440to441(), new Upgrade441to450(), new Upgrade450to460()});
 
         _upgradeMap.put("2.2.15", new DbUpgrade[] {new Upgrade2214to30(), new Upgrade30to301(),
new Upgrade301to302(),
-            new Upgrade302to303(), new Upgrade303to304(), new Upgrade304to305(), new Upgrade305to306(),
new Upgrade306to307(), new Upgrade307to410(),
-            new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade302to303(), new Upgrade303to304(), new Upgrade304to305(), new
Upgrade305to306(), new Upgrade306to307(), new Upgrade307to410(),
+                new Upgrade410to420(),
+                new Upgrade420to421(), new Upgrade421to430(),
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new
Upgrade450to460()});
 
         _upgradeMap.put("2.2.16", new DbUpgrade[] {new Upgrade2214to30(), new Upgrade30to301(),
new Upgrade301to302(),
-            new Upgrade302to303(), new Upgrade303to304(), new Upgrade304to305(), new Upgrade305to306(),
new Upgrade306to307(), new Upgrade307to410(),
-            new Upgrade410to420(),
-            new Upgrade420to421(), new Upgrade421to430(), new Upgrade430to440(), new Upgrade440to441(),
new Upgrade441to450()});
+                new Upgrade302to303(), new Upgrade303to304(), new Upgrade304to305(), new
Upgrade305to306(), new Upgrade306to307(), new Upgrade307to410(),
+                new Upgrade410to420(),
+                new Upgrade420to421(), new Upgrade421to430(),
+                new Upgrade430to440(), new Upgrade440to441(), new Upgrade441to450(), new
Upgrade450to460()});
     }
 
     protected void runScript(Connection conn, File file) {
@@ -325,7 +351,7 @@ public class DatabaseUpgradeChecker implements SystemIntegrityChecker
{
                     upgradeVersion = false;
                 } else if (upgrade.getUpgradedVersion().equals("2.2.4")) {
                     try(PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM version
WHERE version='2.2.4'");
-                        ResultSet rs = pstmt.executeQuery();) {
+                            ResultSet rs = pstmt.executeQuery();) {
                         // specifically for domain vlan update from 2.1.8 to 2.2.4
                         if (rs.next()) {
                             upgradeVersion = false;

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf5b56d6/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java b/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java
new file mode 100644
index 0000000..990371c
--- /dev/null
+++ b/engine/schema/src/com/cloud/upgrade/dao/Upgrade450to460.java
@@ -0,0 +1,71 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with 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 Upgrade450to460 implements DbUpgrade {
+    final static Logger s_logger = Logger.getLogger(Upgrade450to460.class);
+
+    @Override
+    public String[] getUpgradableVersionRange() {
+        return new String[] {"4.5.0", "4.6.0"};
+    }
+
+    @Override
+    public String getUpgradedVersion() {
+        return "4.6.0";
+    }
+
+    @Override
+    public boolean supportsRollingUpgrade() {
+        return false;
+    }
+
+    @Override
+    public File[] getPrepareScripts() {
+        String script = Script.findScript("", "db/schema-450to460.sql");
+        if (script == null) {
+            throw new CloudRuntimeException("Unable to find db/schema-450to460.sql");
+        }
+
+        return new File[] {new File(script)};
+    }
+
+    @Override
+    public void performDataMigration(Connection conn) {
+    }
+
+
+    @Override
+    public File[] getCleanupScripts() {
+        String script = Script.findScript("", "db/schema-450to460-cleanup.sql");
+        if (script == null) {
+            throw new CloudRuntimeException("Unable to find db/schema-450to460-cleanup.sql");
+        }
+
+        return new File[] {new File(script)};
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf5b56d6/setup/db/db/schema-450to460-cleanup.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-450to460-cleanup.sql b/setup/db/db/schema-450to460-cleanup.sql
new file mode 100644
index 0000000..866920c
--- /dev/null
+++ b/setup/db/db/schema-450to460-cleanup.sql
@@ -0,0 +1,21 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with 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.
+
+--
+-- Schema cleanup from 4.5.0 to 4.6.0
+--
+

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/cf5b56d6/setup/db/db/schema-450to460.sql
----------------------------------------------------------------------
diff --git a/setup/db/db/schema-450to460.sql b/setup/db/db/schema-450to460.sql
new file mode 100644
index 0000000..8da5486
--- /dev/null
+++ b/setup/db/db/schema-450to460.sql
@@ -0,0 +1,20 @@
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements.  See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership.  The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with 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.
+
+--
+-- Schema upgrade from 4.5.0 to 4.6.0
+--


Mime
View raw message