2011-10-14 21:45:58 +01:00
|
|
|
class CreateEventLogs < ActiveRecord::Migration
|
|
|
|
def self.up
|
|
|
|
create_table :event_logs do |t|
|
2014-09-02 18:22:27 +01:00
|
|
|
t.references :user, foreign_key: false, index: true
|
2011-10-14 21:45:58 +01:00
|
|
|
t.string :user_name
|
2014-09-02 18:22:27 +01:00
|
|
|
t.references :object, polymorphic: true, index: true
|
2011-10-14 21:45:58 +01:00
|
|
|
t.string :object_name
|
|
|
|
t.string :ip
|
|
|
|
t.string :kind
|
|
|
|
t.string :protocol
|
|
|
|
t.string :controller
|
|
|
|
t.string :action
|
|
|
|
t.text :message
|
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.down
|
|
|
|
drop_table :event_logs
|
|
|
|
end
|
|
|
|
end
|