add an events table

git-svn-id: file:///home/svn/framework3/trunk@8104 4d416f70-5f16-0410-b530-b9f4589650da
This commit is contained in:
James Lee 2010-01-13 06:40:34 +00:00
parent de2a293c26
commit fd89f4e6cd
2 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,16 @@
class AddEventsTable < ActiveRecord::Migration
def self.up
create_table :events do |t|
t.integer :workspace_id
t.integer :host_id
t.timestamp :created_at
t.string :user
t.string :name
t.string :info
end
end
def self.down
drop_table :events
end
end

View File

@ -0,0 +1,13 @@
module Msf
class DBManager
class Event < ActiveRecord::Base
include DBSave
belongs_to :workspace
belongs_to :host
serialize :info
end
end
end