-
Notifications
You must be signed in to change notification settings - Fork 13.9k
/
20101001000000_add_web_tables.rb
executable file
·57 lines (49 loc) · 1.18 KB
/
20101001000000_add_web_tables.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
class AddWebTables < ActiveRecord::Migration
def self.up
create_table :web_sites do |t|
t.integer :service_id, :null => false
t.timestamps
t.string :vhost, :limit => 2048
t.text :comments
t.text :options
end
create_table :web_pages do |t|
t.integer :web_site_id, :null => false
t.timestamps
t.text :path
t.text :query
t.integer :code, :null => false
t.text :cookie
t.text :auth
t.text :ctype
t.timestamp :mtime
t.text :location
t.text :body
t.text :headers
end
create_table :web_forms do |t|
t.integer :web_site_id, :null => false
t.timestamps
t.text :path
t.string :method, :limit => 1024
t.text :params
end
create_table :web_vulns do |t|
t.integer :web_site_id, :null => false
t.timestamps
t.text :path
t.string :method, :limit => 1024
t.text :params
t.text :pname
t.text :proof
t.integer :risk
t.string :name, :limit => 1024
end
end
def self.down
drop_table :web_sites
drop_table :web_pages
drop_table :web_forms
drop_table :web_vulns
end
end