20200630190240_create_webauthn_credentials.rb 449 B

123456789101112131415161718
  1. # frozen_string_literal: true
  2. class CreateWebauthnCredentials < ActiveRecord::Migration[5.2]
  3. def change
  4. create_table :webauthn_credentials do |t|
  5. t.string :external_id, null: false
  6. t.string :public_key, null: false
  7. t.string :nickname, null: false
  8. t.bigint :sign_count, null: false, default: 0
  9. t.index :external_id, unique: true
  10. t.references :user, foreign_key: true
  11. t.timestamps
  12. end
  13. end
  14. end