/
017_expand_info2.rb
executable file
·58 lines (46 loc) · 1.1 KB
/
017_expand_info2.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
class ExpandInfo2 < ActiveRecord::Migration
def self.up
remove_column :events, :info
change_table :events do |t|
t.string :info, :limit => 65536
end
remove_column :notes, :data
change_table :notes do |t|
t.string :data, :limit => 65536
end
remove_column :vulns, :data
change_table :vulns do |t|
t.string :data, :limit => 65536
end
remove_column :hosts, :info
change_table :hosts do |t|
t.string :info, :limit => 65536
end
remove_column :services, :info
change_table :services do |t|
t.string :info, :limit => 65536
end
end
def self.down
remove_column :events, :info
change_table :events do |t|
t.string :info
end
remove_column :notes, :data
change_table :notes do |t|
t.string :data, :limit => 4096
end
remove_column :hosts, :info
change_table :hosts do |t|
t.string :info, :limit => 4096
end
remove_column :vulns, :data
change_table :vulns do |t|
t.string :data, :limit => 4096
end
remove_column :services, :info
change_table :services do |t|
t.string :info, :limit => 4096
end
end
end