Sha256: 14737fdc1e0e17580126c2ed411b73517c95efaa9401aa63310eaa4c03feb5e9

Contents?: true

Size: 1.31 KB

Versions: 22

Compression:

Stored size: 1.31 KB

Contents

class ErrdoCreateErrors < ActiveRecord::Migration
  def change
    create_table :errors do |t|
      t.string :exception_class_name
      t.string :exception_message
      t.string :http_method
      t.string :host_name
      t.string :url

      t.text :backtrace

      t.string :backtrace_hash
      t.integer :occurrence_count, default: 0
      t.datetime :last_occurred_at

      t.string :last_experiencer_type
      t.integer :last_experiencer_id

      t.integer :status, default: 0
      t.string :importance, default: "error"


      t.timestamps null: false
    end

    create_table :error_occurrences do |t|
      t.integer :error_id

      t.string :experiencer_type
      t.integer :experiencer_id

      t.string :ip
      t.string :user_agent
      t.string :referer
      t.string :query_string
      t.text :form_values
      t.text :param_values
      t.text :cookie_values
      t.text :header_values

      t.integer :ocurrence_count, default: 1
      t.timestamps null: false
    end

    add_index :errors, :backtrace_hash, unique: true
    add_index :errors, :importance
    add_index :errors, :last_experiencer_id
    add_index :errors, :last_experiencer_type

    add_index :error_occurrences, :experiencer_id
    add_index :error_occurrences, :experiencer_type
    add_index :error_occurrences, :error_id
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
errdo-0.12.14 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.13 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.12 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.11 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.10 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.9 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.8 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.7 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.6 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.5 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.4 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.3 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.2 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.1 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.12.0 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.11.6 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.11.5 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.11.4 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.11.3 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb
errdo-0.11.2 test/dummy/db/migrate/20161004015324_errdo_create_errors.rb