Class: AddLoggedExceptionTable

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/exception_logger/migration/templates/migration.rb

Class Method Summary collapse

Class Method Details

.downObject



15
16
17
# File 'lib/generators/exception_logger/migration/templates/migration.rb', line 15

def self.down
  drop_table "<%= options[:exception_table_name] %>"
end

.upObject



2
3
4
5
6
7
8
9
10
11
12
13
# File 'lib/generators/exception_logger/migration/templates/migration.rb', line 2

def self.up
  create_table "<%= options[:exception_table_name] %>", :force => true do |t|
    t.string :exception_class
    t.string :controller_name
    t.string :action_name
    t.text :message
    t.text :backtrace
    t.text :environment
    t.text :request
    t.datetime :created_at
  end
end