class CreateAudits

Public Instance Methods

change() click to toggle source
# File lib/generators/active_audit/templates/install_migration.rb, line 2
def change
  create_table :audits do |t|
    t.references :auditable,  null: false, index: true, polymorphic: true
    t.references :user,       index: true
    t.integer    :source,     null: false, default: 0
    t.string     :action,     null: false
    t.text       :revisions
    t.text       :comment
    t.string     :remote_ip
    t.string     :remote_uuid
    t.timestamps              null: false
  end
end