retrospring/db/migrate/20201101155648_create_totp_recovery_codes.rb
2023-10-21 13:01:07 +02:00

11 lines
276 B
Ruby

# frozen_string_literal: true
class CreateTotpRecoveryCodes < ActiveRecord::Migration[5.2]
def change
create_table :totp_recovery_codes do |t|
t.bigint :user_id
t.string :code, limit: 8
end
add_index :totp_recovery_codes, %i[user_id code]
end
end