scinote-web/db/migrate/20200714082503_add_lockable_to_user.rb

12 lines
300 B
Ruby
Raw Normal View History

2020-07-14 20:53:20 +08:00
# frozen_string_literal: true
2020-07-17 22:35:03 +08:00
class AddLockableToUser < ActiveRecord::Migration[6.0]
2020-07-14 20:53:20 +08:00
def change
change_table :users, bulk: true do |t|
t.integer :failed_attempts, default: 0, null: false
t.datetime :locked_at
2020-07-17 22:35:03 +08:00
t.string :unlock_token, index: { unique: true }
2020-07-14 20:53:20 +08:00
end
end
end