GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — schema: add upgrade path from 4.4.0 to 4.5.0 via 4.4.1 · gitqueue/cloudstack@d42e204

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • engine/schema/src/com/cloud/upgrade
    • DatabaseUpgradeChecker.java
    • dao
      • Upgrade440to441.java
      • Upgrade441to450.java
  • setup/db/db
    • schema-440to441-cleanup.sql
    • schema-440to441.sql
    • schema-441to450-cleanup.sql
    • schema-441to450.sql
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java‎

Copy file name to clipboardExpand all lines: engine/schema/src/com/cloud/upgrade/DatabaseUpgradeChecker.java
+82-95Lines changed: 82 additions & 95 deletions
Large diffs are not rendered by default.
Collapse file

‎engine/schema/src/com/cloud/upgrade/dao/Upgrade440to441.java‎

Copy file name to clipboard
+69Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
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 Upgrade440to441 implements DbUpgrade {
29+
final static Logger s_logger = Logger.getLogger(Upgrade440to441.class);
30+
31+
@Override
32+
public String[] getUpgradableVersionRange() {
33+
return new String[] {"4.4.0", "4.4.1"};
34+
}
35+
36+
@Override
37+
public String getUpgradedVersion() {
38+
return "4.4.1";
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-440to441.sql");
49+
if (script == null) {
50+
throw new CloudRuntimeException("Unable to find db/schema-440to441.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+
String script = Script.findScript("", "db/schema-440to441-cleanup.sql");
63+
if (script == null) {
64+
throw new CloudRuntimeException("Unable to find db/schema-440to441-cleanup.sql");
65+
}
66+
67+
return new File[] {new File(script)};
68+
}
69+
}
Collapse file

‎…m/cloud/upgrade/dao/Upgrade440to450.java‎ ‎…m/cloud/upgrade/dao/Upgrade441to450.java‎engine/schema/src/com/cloud/upgrade/dao/Upgrade440to450.java renamed to engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java engine/schema/src/com/cloud/upgrade/dao/Upgrade440to450.java renamed to engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java

Copy file name to clipboardExpand all lines: engine/schema/src/com/cloud/upgrade/dao/Upgrade441to450.java
+7-7Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
import com.cloud.utils.exception.CloudRuntimeException;
3030
import com.cloud.utils.script.Script;
3131

32-
public class Upgrade440to450 implements DbUpgrade {
33-
final static Logger s_logger = Logger.getLogger(Upgrade440to450.class);
32+
public class Upgrade441to450 implements DbUpgrade {
33+
final static Logger s_logger = Logger.getLogger(Upgrade441to450.class);
3434

3535
@Override
3636
public String[] getUpgradableVersionRange() {
37-
return new String[] {"4.4.0", "4.5.0"};
37+
return new String[] {"4.4.1", "4.5.0"};
3838
}
3939

4040
@Override
@@ -49,9 +49,9 @@ public boolean supportsRollingUpgrade() {
4949

5050
@Override
5151
public File[] getPrepareScripts() {
52-
String script = Script.findScript("", "db/schema-440to450.sql");
52+
String script = Script.findScript("", "db/schema-441to450.sql");
5353
if (script == null) {
54-
throw new CloudRuntimeException("Unable to find db/schema-440to450.sql");
54+
throw new CloudRuntimeException("Unable to find db/schema-441to450.sql");
5555
}
5656

5757
return new File[] {new File(script)};
@@ -65,9 +65,9 @@ public void performDataMigration(Connection conn) {
6565

6666
@Override
6767
public File[] getCleanupScripts() {
68-
String script = Script.findScript("", "db/schema-440to450-cleanup.sql");
68+
String script = Script.findScript("", "db/schema-441to450-cleanup.sql");
6969
if (script == null) {
70-
throw new CloudRuntimeException("Unable to find db/schema-440to450-cleanup.sql");
70+
throw new CloudRuntimeException("Unable to find db/schema-441to450-cleanup.sql");
7171
}
7272

7373
return new File[] {new File(script)};
Collapse file

‎setup/db/db/schema-440to441-cleanup.sql‎

Copy file name to clipboard
+20Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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 cleanup from 4.4.0 to 4.4.1;
20+
--;
Collapse file

‎setup/db/db/schema-440to441.sql‎

Copy file name to clipboard
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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.0 to 4.4.1;
20+
--;
21+
22+
-- Disable foreign key checking
23+
SET foreign_key_checks = 0;
Collapse file

‎setup/db/db/schema-440to450-cleanup.sql‎ ‎setup/db/db/schema-441to450-cleanup.sql‎setup/db/db/schema-440to450-cleanup.sql renamed to setup/db/db/schema-441to450-cleanup.sql

Copy file name to clipboard
File renamed without changes.
Collapse file

‎setup/db/db/schema-440to450.sql‎ ‎setup/db/db/schema-441to450.sql‎setup/db/db/schema-440to450.sql renamed to setup/db/db/schema-441to450.sql

Copy file name to clipboard
File renamed without changes.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.