Sha256: 16fc8d175949ef74092ce5656130e419b93b23f21df70a369b353b577e054fdb

Contents?: true

Size: 334 Bytes

Versions: 6

Compression:

Stored size: 334 Bytes

Contents

class AddPinfirmableColumnsToResource < ActiveRecord::Migration[5.0]
  def change
    model = (ENV["MODEL"] || "user").downcase.pluralize.to_sym
    add_column model, :pinfirmable_pin, :string
    add_column model, :pinfirmable_tries, :integer, default: 0
    add_column model, :pinfirmable_lockout, :datetime, default: nil
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pinfirmable-0.1.5 db/migrate/20160901131628_add_pinfirmable_columns_to_resource.rb
pinfirmable-0.1.4 db/migrate/20160901131628_add_pinfirmable_columns_to_resource.rb
pinfirmable-0.1.3 db/migrate/20160901131628_add_pinfirmable_columns_to_resource.rb
pinfirmable-0.1.2 db/migrate/20160901131628_add_pinfirmable_columns_to_resource.rb
pinfirmable-0.1.1 db/migrate/20160901131628_add_pinfirmable_columns_to_resource.rb
pinfirmable-0.1.0 db/migrate/20160901131628_add_pinfirmable_columns_to_resource.rb