Sha256: 0a112c034fd0b382b9181eece30e9bba0f5d794d13f8a30eeb16395198ac688f

Contents?: true

Size: 1.09 KB

Versions: 11

Compression:

Stored size: 1.09 KB

Contents

class CreateRequestLog < ActiveRecord::Migration
  TABLE_NAME = ImprovedLogging::TABLE_NAME
  
  def self.up
    create_table TABLE_NAME, :force => true do |t|
      t.integer :user_id              # account ID
      t.string :ip                    # remote IP
      t.integer :xhr                  # yes/no
      t.string :method                # get/post etc.
      t.string :protocol              # http:/https:
      t.string :host                  # host
      t.string :path                  # path
      t.string :query                 # query param
      t.string :action                # controller + action
      t.string :status                # result status
      t.integer :msecs                # time needed 
      t.integer :queries              # of SQL queries needed
      t.integer :sql_select           # of SQL queries needed
      t.integer :sql_update           # of SQL queries needed
      t.integer :sql_insert           # of SQL queries needed
      t.integer :sql_delete           # of SQL queries needed
    end
  end

  def self.down
    drop_table(TABLE_NAME) rescue nil
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
vex-0.6.2 migration/create_request_log.rb
vex-0.4.4 migration/create_request_log.rb
vex-0.3.3 migration/create_request_log.rb
vex-0.2.9 migration/create_request_log.rb
vex-0.2.8 migration/create_request_log.rb
vex-0.2.7 migration/create_request_log.rb
vex-0.2.6 migration/create_request_log.rb
vex-0.2.5 migration/create_request_log.rb
vex-0.2.2 migration/create_request_log.rb
vex-0.2.1 migration/create_request_log.rb
vex-0.2 migration/create_request_log.rb