Class: ErrorLog::Migrations::Base

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/error_log/migrations/base.rb

Overview

Base migration, create error_logs table

Class Method Summary collapse

Class Method Details

.upObject



5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/error_log/migrations/base.rb', line 5

def self.up
  create_table :error_logs do |t|
    t.text :error
    t.text :backtrace
    t.string :category
    t.string :error_hash
    t.integer :level_id
    t.timestamp :created_at
    t.boolean :viewed, :default => false
  end

  add_index :error_logs, :category
end