Class: ExpandInfo

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
db/migrate/005_expand_info.rb

Class Method Summary collapse

Class Method Details

.downObject



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
# File 'db/migrate/005_expand_info.rb', line 29

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 => 1024
	end

	remove_column :hosts, :info
	change_table :hosts do |t|
		t.string    :info, :limit => 1024
	end

	remove_column :vulns, :data
	change_table :hosts do |t|
		t.string    :data, :limit => 1024
	end

	remove_column :services, :info
	change_table :services do |t|
		t.string    :info, :limit => 1024
	end

end

.upObject



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
# File 'db/migrate/005_expand_info.rb', line 2

def self.up
	remove_column :events, :info
	change_table :events do |t|
		t.string    :info, :limit => 4096
	end

	remove_column :notes, :data
	change_table :notes do |t|
		t.string    :data, :limit => 4096
	end

	remove_column :vulns, :data
	change_table :vulns 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 :services, :info
	change_table :services do |t|
		t.string    :info, :limit => 4096
	end
end