Revision 6946a039

View differences:

install.sh
1095 1095
                      src/onedb/3.8.0_to_3.8.1.rb \
1096 1096
                      src/onedb/3.8.1_to_3.8.2.rb \
1097 1097
                      src/onedb/3.8.2_to_3.8.3.rb \
1098
                      src/onedb/3.8.3_to_3.8.4.rb \
1098 1099
                      src/onedb/3.8.3_to_3.9.80.rb \
1099 1100
                      src/onedb/fsck.rb \
1100 1101
                      src/onedb/onedb.rb \
src/onedb/3.8.3_to_3.8.4.rb
1
# -------------------------------------------------------------------------- #
2
# Copyright 2002-2013, OpenNebula Project (OpenNebula.org), C12G Labs        #
3
#                                                                            #
4
# Licensed under the Apache License, Version 2.0 (the "License"); you may    #
5
# not use this file except in compliance with the License. You may obtain    #
6
# a copy of the License at                                                   #
7
#                                                                            #
8
# http://www.apache.org/licenses/LICENSE-2.0                                 #
9
#                                                                            #
10
# Unless required by applicable law or agreed to in writing, software        #
11
# distributed under the License is distributed on an "AS IS" BASIS,          #
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
13
# See the License for the specific language governing permissions and        #
14
# limitations under the License.                                             #
15
#--------------------------------------------------------------------------- #
16

  
17
module Migrator
18
    def db_version
19
        "3.8.4"
20
    end
21

  
22
    def one_version
23
        "OpenNebula 3.8.4"
24
    end
25

  
26
    def up
27

  
28
        ########################################################################
29
        #  Bug #1813: change body column type from TEXT to MEDIUMTEXT
30
        ########################################################################
31

  
32
        # Sqlite does not support alter table modify column, but the TEXT column
33
        # is enough in sqlite.
34

  
35
        if !@sqlite_file
36
            @db.run "ALTER TABLE cluster_pool MODIFY COLUMN body MEDIUMTEXT;"
37
            @db.run "ALTER TABLE datastore_pool MODIFY COLUMN body MEDIUMTEXT;"
38
            @db.run "ALTER TABLE document_pool MODIFY COLUMN body MEDIUMTEXT;"
39
            @db.run "ALTER TABLE group_pool MODIFY COLUMN body MEDIUMTEXT;"
40
            @db.run "ALTER TABLE history MODIFY COLUMN body MEDIUMTEXT;"
41
            @db.run "ALTER TABLE host_monitoring MODIFY COLUMN body MEDIUMTEXT;"
42
            @db.run "ALTER TABLE host_pool MODIFY COLUMN body MEDIUMTEXT;"
43
            @db.run "ALTER TABLE image_pool MODIFY COLUMN body MEDIUMTEXT;"
44
            @db.run "ALTER TABLE leases MODIFY COLUMN body MEDIUMTEXT;"
45
            @db.run "ALTER TABLE network_pool MODIFY COLUMN body MEDIUMTEXT;"
46
            @db.run "ALTER TABLE template_pool MODIFY COLUMN body MEDIUMTEXT;"
47
            @db.run "ALTER TABLE user_pool MODIFY COLUMN body MEDIUMTEXT;"
48
            @db.run "ALTER TABLE vm_monitoring MODIFY COLUMN body MEDIUMTEXT;"
49
            @db.run "ALTER TABLE vm_pool MODIFY COLUMN body MEDIUMTEXT;"
50
        end
51

  
52
        return true
53
    end
54
end

Also available in: Unified diff