Sha256: ad7866fb889c64a4e3d0c4b19cf4d7ea389de648ff921f8feea1a54fece754f2

Contents?: true

Size: 752 Bytes

Versions: 4

Compression:

Stored size: 752 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

4 entries across 4 versions & 1 rubygems

Version Path
exception_handler-0.8.0.2 db/migrate/000000_create_errors.rb
exception_handler-0.8.0.1 db/migrate/000000_create_errors.rb
exception_handler-0.8.0.0 db/migrate/000000_create_errors.rb
exception_handler-0.7.7.0 db/migrate/000000_create_errors.rb