Class: AddWmapTables

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
db/migrate/001_add_wmap_tables.rb

Class Method Summary collapse

Class Method Details

.downObject



30
31
32
33
# File 'db/migrate/001_add_wmap_tables.rb', line 30

def self.down
	drop_table :wmap_targets
	drop_table :wmap_requests
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
28
# File 'db/migrate/001_add_wmap_tables.rb', line 2

def self.up
	create_table :wmap_targets do |t|
		t.string  :host                  # vhost
		t.string  :address, :limit => 16 # unique
		t.string  :address6
		t.integer :port
		t.integer :ssl
		t.integer :selected
	end

	create_table :wmap_requests do |t|
		t.string  :host                  # vhost
		t.string  :address, :limit => 16 # unique
		t.string  :address6
		t.integer :port
		t.integer :ssl
		t.string  :meth, :limit => 32
		t.text    :path
		t.text    :headers
		t.text    :query
		t.text    :body
		t.string  :respcode, :limit => 16
		t.text    :resphead
		t.text    :response
		t.timestamp :created
	end
end