2010-10-02 18:48:29 +00:00
|
|
|
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
|
2010-12-04 03:19:01 +00:00
|
|
|
t.string :path, :limit => 4096
|
|
|
|
t.string :query, :limit => 4096
|
2010-10-02 18:48:29 +00:00
|
|
|
t.integer :code, :null => false
|
2010-12-04 03:19:01 +00:00
|
|
|
t.string :cookie, :limit => 4096
|
|
|
|
t.string :auth, :limit => 4096
|
|
|
|
t.string :ctype, :limit => 4096
|
2010-10-02 18:48:29 +00:00
|
|
|
t.timestamp :mtime
|
2010-12-04 03:19:01 +00:00
|
|
|
t.string :location, :limit => 4096
|
2010-10-02 18:48:29 +00:00
|
|
|
t.text :body
|
|
|
|
t.text :headers
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table :web_forms do |t|
|
|
|
|
t.integer :web_site_id, :null => false
|
|
|
|
t.timestamps
|
2010-12-04 03:19:01 +00:00
|
|
|
t.string :path, :limit => 4096
|
2010-10-02 18:48:29 +00:00
|
|
|
t.string :method, :limit => 1024
|
|
|
|
t.text :params
|
|
|
|
end
|
|
|
|
|
|
|
|
create_table :web_vulns do |t|
|
|
|
|
t.integer :web_site_id, :null => false
|
|
|
|
t.timestamps
|
2010-12-04 03:19:01 +00:00
|
|
|
t.string :path, :limit => 4096
|
2010-10-02 18:48:29 +00:00
|
|
|
t.string :method, :limit => 1024
|
|
|
|
t.text :params
|
2010-12-04 03:19:01 +00:00
|
|
|
t.string :pname, :limit => 4096
|
2010-10-02 18:48:29 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
|