Class: CreateGrapeLog

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/grape_db_logger/migration.rb

Instance Method Summary collapse

Instance Method Details

#changeObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/grape_db_logger/migration.rb', line 2

def change
  create_table :grape_logs do |t|
    t.string   :request_method
    t.string   :path
    t.text     :params
    t.string   :referer
    t.string   :user_agent
    t.string   :ip
    t.datetime :created_at
  end
  add_index :grape_logs, :created_at
  add_index :grape_logs, :request_method
  add_index :grape_logs, :path
end