Sha256: 1344a8c851dd078b31c61d2031e79d34c27371e53a5df60b3061788cded83f4f

Contents?: true

Size: 718 Bytes

Versions: 3

Compression:

Stored size: 718 Bytes

Contents

class CreateErrors < ActiveRecord::Migration[5.0]

  # => ATTRS
  require_relative "../../app/models/exception_handler/exception.rb"

  #########################################
  #########################################

    # => Defs
    @@table = ExceptionHandler.config.try(:db)

  #########################################

    # Up
    def up
      create_table @@table do |t|
        ExceptionHandler::ATTRS.each do |attr|
          t.text attr
        end
        t.timestamps
      end
    end

  #########################################

    # Down
    def down
      drop_table @@table, if_exists: true
    end

  #########################################
  #########################################

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
exception_handler-0.7.6.0 db/migrate/000000_create_errors.rb
exception_handler-0.7.5.15 db/migrate/000000_create_errors.rb
exception_handler-0.7.5 db/migrate/000000_create_errors.rb