class CreateErrors
Generated by Errorkit
.
Create an errors table for managing errors.
Public Class Methods
down()
click to toggle source
# File lib/generators/errorkit/templates/db/migrate/create_errors.rb, line 36 def self.down drop_table :errors end
up()
click to toggle source
# File lib/generators/errorkit/templates/db/migrate/create_errors.rb, line 5 def self.up create_table :errors do |t| t.string :environment t.string :server t.string :version t.string :exception t.text :message t.text :backtrace t.string :controller t.string :action t.string :remote_ip t.text :request_env t.text :session t.text :params t.string :worker t.string :queue t.text :payload t.text :url t.integer :user_id t.integer :subject_id t.string :subject_type t.datetime :resolved_at t.timestamps end add_index :errors, :exception add_index :errors, :created_at add_index :errors, :resolved_at end