Sha256: 4300d8cc89d3b59afe6c5a8d6c752f87044d92762fa05b51f9c97cc0ef282d0a

Contents?: true

Size: 649 Bytes

Versions: 1

Compression:

Stored size: 649 Bytes

Contents

class CreateAudits < ActiveRecord::Migration
  def change
    create_table :audits do |t|
      t.integer :user_id

      t.string :obj_id
      t.string :obj_type

      t.string :controller_name
      t.string :action_name

      t.string :ip
      t.string :remote_ip
      t.string :fullpath
      t.string :referer

      t.boolean :bot, default: false
      t.string  :user_agent

      t.string :remote_addr
      t.string :remote_host

      t.text :data

      # add_index :the_audits, :referer
      # add_index :the_audits, :user_agent
      # add_index :the_audits, [:controller_name, :action_name]

      t.timestamps
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
the_audit-0.0.2 db/migrate/20130130163149_create_audits.rb