about summary refs log tree commit diff
path: root/db/migrate/20200630190240_create_webauthn_credentials.rb
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2020-08-30 18:34:51 +0200
committerGitHub <noreply@github.com>2020-08-30 18:34:51 +0200
commitf715e8b51612820a18fa307e4465eb0c1a088f86 (patch)
tree8137b48a716e05424ca544210d86e91818085ba7 /db/migrate/20200630190240_create_webauthn_credentials.rb
parent30632adf9eda6d83a9b4269f23f11ced5e09cd93 (diff)
parenta68ec50e4e38898e88a7dcc33bd0032adc946dda (diff)
Merge pull request #1411 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'db/migrate/20200630190240_create_webauthn_credentials.rb')
-rw-r--r--db/migrate/20200630190240_create_webauthn_credentials.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20200630190240_create_webauthn_credentials.rb b/db/migrate/20200630190240_create_webauthn_credentials.rb
new file mode 100644
index 000000000..ea924238d
--- /dev/null
+++ b/db/migrate/20200630190240_create_webauthn_credentials.rb
@@ -0,0 +1,16 @@
+class CreateWebauthnCredentials < ActiveRecord::Migration[5.2]
+  def change
+    create_table :webauthn_credentials do |t|
+      t.string :external_id, null: false
+      t.string :public_key, null: false
+      t.string :nickname, null: false
+      t.bigint :sign_count, null: false, default: 0
+
+      t.index :external_id, unique: true
+
+      t.references :user, foreign_key: true
+
+      t.timestamps
+    end
+  end
+end