Change migration

This commit is contained in:
Mojca Lorber 2020-07-17 16:35:03 +02:00
parent b087a8cbce
commit d8794972d5

View file

@ -1,11 +1,11 @@
# frozen_string_literal: true
class AddLockableToDevise < ActiveRecord::Migration[6.0]
class AddLockableToUser < ActiveRecord::Migration[6.0]
def change
change_table :users, bulk: true do |t|
t.integer :failed_attempts, default: 0, null: false
t.datetime :locked_at
t.string :unlock_token, index: true, foreign_key: { to_table: :users }, unique: true
t.string :unlock_token, index: { unique: true }
end
end
end