File tree Expand file tree Collapse file tree 2 files changed +68
-0
lines changed
java/com/cloud/upgrade/dao Expand file tree Collapse file tree 2 files changed +68
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .cloud .upgrade .dao ;
2+
3+ import java .io .InputStream ;
4+ import java .sql .Connection ;
5+
6+ import com .cloud .utils .exception .CloudRuntimeException ;
7+
8+ public class Upgrade41300to41310 implements DbUpgrade {
9+
10+ @ Override
11+ public String [] getUpgradableVersionRange () {
12+ return new String [] {"4.13.0.0" , "4.13.1.0" };
13+ }
14+
15+ @ Override
16+ public String getUpgradedVersion () {
17+ return "4.13.1.0" ;
18+ }
19+
20+ @ Override
21+ public boolean supportsRollingUpgrade () {
22+ return false ;
23+ }
24+
25+ @ Override
26+ public InputStream [] getPrepareScripts () {
27+ final String scriptFile = "META-INF/db/schema-41300to41310.sql" ;
28+ final InputStream script = Thread .currentThread ().getContextClassLoader ().getResourceAsStream (scriptFile );
29+ if (script == null ) {
30+ throw new CloudRuntimeException ("Unable to find " + scriptFile );
31+ }
32+
33+ return new InputStream [] {script };
34+ }
35+
36+ @ Override
37+ public void performDataMigration (Connection conn ) {
38+ }
39+
40+ @ Override
41+ public InputStream [] getCleanupScripts () {
42+ return null ;
43+ }
44+
45+ }
Original file line number Diff line number Diff line change 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.13.0.0 to 4.13.1.0
20+ -- ;
21+
22+ -- #3659 Fix typo: the past tense of shutdown is shutdown, not shutdowned
23+ UPDATE ` cloud` .` vm_instance` SET state= ' Shutdown' WHERE state= ' Shutdowned' ;
You can’t perform that action at this time.
0 commit comments