| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent b85183e commit a52fd08
6 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,64 @@ | |||
| 1 | + // Licensed to the Apache Software Foundation (ASF) under one | ||
| 2 | + // or more contributor license agreements. See the NOTICE file | ||
| 3 | + // distributed with this work for additional information | ||
| 4 | + // regarding copyright ownership. The ASF licenses this file | ||
| 5 | + // to you under the Apache License, Version 2.0 (the | ||
| 6 | + // "License"); you may not use this file except in compliance | ||
| 7 | + // with the License. You may obtain a copy of the License at | ||
| 8 | + // | ||
| 9 | + // http://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | + // | ||
| 11 | + // Unless required by applicable law or agreed to in writing, | ||
| 12 | + // software distributed under the License is distributed on an | ||
| 13 | + // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| 14 | + // KIND, either express or implied. See the License for the | ||
| 15 | + // specific language governing permissions and limitations | ||
| 16 | + // under the License. | ||
| 17 | + | ||
| 18 | + package com.cloud.upgrade.dao; | ||
| 19 | + | ||
| 20 | + import java.io.File; | ||
| 21 | + import java.sql.Connection; | ||
| 22 | + | ||
| 23 | + import org.apache.log4j.Logger; | ||
| 24 | + | ||
| 25 | + import com.cloud.utils.exception.CloudRuntimeException; | ||
| 26 | + import com.cloud.utils.script.Script; | ||
| 27 | + | ||
| 28 | + public class Upgrade441to442 implements DbUpgrade { | ||
| 29 | + final static Logger s_logger = Logger.getLogger(Upgrade441to442.class); | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public String[] getUpgradableVersionRange() { | ||
| 33 | + return new String[] {"4.4.1", "4.4.2"}; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + @Override | ||
| 37 | + public String getUpgradedVersion() { | ||
| 38 | + return "4.4.2"; | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | + @Override | ||
| 42 | + public boolean supportsRollingUpgrade() { | ||
| 43 | + return false; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + @Override | ||
| 47 | + public File[] getPrepareScripts() { | ||
| 48 | + String script = Script.findScript("", "db/schema-441to442.sql"); | ||
| 49 | + if (script == null) { | ||
| 50 | + throw new CloudRuntimeException("Unable to find db/schema-441to442.sql"); | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + return new File[] {new File(script)}; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + @Override | ||
| 57 | + public void performDataMigration(Connection conn) { | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + @Override | ||
| 61 | + public File[] getCleanupScripts() { | ||
| 62 | + return null; | ||
| 63 | + } | ||
| 64 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,12 +35,12 @@ | |||
| 35 | 35 | import com.cloud.utils.exception.CloudRuntimeException; | |
| 36 | 36 | import com.cloud.utils.script.Script; | |
| 37 | 37 | ||
| 38 | - public class Upgrade441to450 implements DbUpgrade { | ||
| 39 | - final static Logger s_logger = Logger.getLogger(Upgrade441to450.class); | ||
| 38 | + public class Upgrade442to450 implements DbUpgrade { | ||
| 39 | + final static Logger s_logger = Logger.getLogger(Upgrade442to450.class); | ||
| 40 | 40 | ||
| 41 | 41 | @Override | |
| 42 | 42 | public String[] getUpgradableVersionRange() { | |
| 43 | - return new String[] {"4.4.1", "4.5.0"}; | ||
| 43 | + return new String[] {"4.4.2", "4.5.0"}; | ||
| 44 | 44 | } | |
| 45 | 45 | ||
| 46 | 46 | @Override | |
@@ -55,9 +55,9 @@ public boolean supportsRollingUpgrade() { | |||
| 55 | 55 | ||
| 56 | 56 | @Override | |
| 57 | 57 | public File[] getPrepareScripts() { | |
| 58 | - String script = Script.findScript("", "db/schema-441to450.sql"); | ||
| 58 | + String script = Script.findScript("", "db/schema-442to450.sql"); | ||
| 59 | 59 | if (script == null) { | |
| 60 | - throw new CloudRuntimeException("Unable to find db/schema-441to450.sql"); | ||
| 60 | + throw new CloudRuntimeException("Unable to find db/schema-442to450.sql"); | ||
| 61 | 61 | } | |
| 62 | 62 | ||
| 63 | 63 | return new File[] {new File(script)}; | |
@@ -73,9 +73,9 @@ public void performDataMigration(Connection conn) { | |||
| 73 | 73 | ||
| 74 | 74 | @Override | |
| 75 | 75 | public File[] getCleanupScripts() { | |
| 76 | - String script = Script.findScript("", "db/schema-441to450-cleanup.sql"); | ||
| 76 | + String script = Script.findScript("", "db/schema-442to450-cleanup.sql"); | ||
| 77 | 77 | if (script == null) { | |
| 78 | - throw new CloudRuntimeException("Unable to find db/schema-441to450-cleanup.sql"); | ||
| 78 | + throw new CloudRuntimeException("Unable to find db/schema-442to450-cleanup.sql"); | ||
| 79 | 79 | } | |
| 80 | 80 | ||
| 81 | 81 | return new File[] {new File(script)}; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,21 @@ | |||
| 1 | + -- Licensed to the Apache Software Foundation (ASF) under one | ||
| 2 | + -- or more contributor license agreements. See the NOTICE file | ||
| 3 | + -- distributed with this work for additional information | ||
| 4 | + -- regarding copyright ownership. The ASF licenses this file | ||
| 5 | + -- to you under the Apache License, Version 2.0 (the | ||
| 6 | + -- "License"); you may not use this file except in compliance | ||
| 7 | + -- with the License. You may obtain a copy of the License at | ||
| 8 | + -- | ||
| 9 | + -- http://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | + -- | ||
| 11 | + -- Unless required by applicable law or agreed to in writing, | ||
| 12 | + -- software distributed under the License is distributed on an | ||
| 13 | + -- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| 14 | + -- KIND, either express or implied. See the License for the | ||
| 15 | + -- specific language governing permissions and limitations | ||
| 16 | + -- under the License. | ||
| 17 | + | ||
| 18 | + --; | ||
| 19 | + -- Schema upgrade from 4.4.1 to 4.4.2; | ||
| 20 | + --; | ||
| 21 | + | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ | |||
| 16 | 16 | -- under the License. | |
| 17 | 17 | ||
| 18 | 18 | -- | |
| 19 | - -- Schema cleanup from 4.4.0 to 4.5.0 | ||
| 19 | + -- Schema cleanup from 4.4.2 to 4.5.0 | ||
| 20 | 20 | -- | |
| 21 | 21 | ||
| 22 | 22 | UPDATE `cloud`.`configuration` | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ | |||
| 16 | 16 | -- under the License. | |
| 17 | 17 | ||
| 18 | 18 | -- | |
| 19 | - -- Schema upgrade from 4.4.1 to 4.5.0 | ||
| 19 | + -- Schema upgrade from 4.4.2 to 4.5.0 | ||
| 20 | 20 | -- | |
| 21 | 21 | ||
| 22 | 22 | -- Disable foreign key checking | |
| Back | FazBrowse Home | New Git URL |
0 commit comments