about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-06-23 10:46:24 +0200
committerClaire <claire.github-309c@sitedethib.com>2021-06-23 10:46:24 +0200
commit37fd9670a586af057d12c3f789c0701ae074314f (patch)
treecc979a0bc830a9cc0c4e0d8beb90c487578dd522 /db/migrate
parenta434f370f38ac66e05000545e36d7c696f4962d0 (diff)
parent63b807cffcba0579efdf2f4ed4a2deb93af4850b (diff)
Merge branch 'main' into glitch-soc/merge-upstream
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20210609202149_create_login_activities.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/db/migrate/20210609202149_create_login_activities.rb b/db/migrate/20210609202149_create_login_activities.rb
new file mode 100644
index 000000000..38e147c32
--- /dev/null
+++ b/db/migrate/20210609202149_create_login_activities.rb
@@ -0,0 +1,14 @@
+class CreateLoginActivities < ActiveRecord::Migration[6.1]
+  def change
+    create_table :login_activities do |t|
+      t.belongs_to :user, null: false, foreign_key: { on_delete: :cascade }
+      t.string :authentication_method
+      t.string :provider
+      t.boolean :success
+      t.string :failure_reason
+      t.inet :ip
+      t.string :user_agent
+      t.datetime :created_at
+    end
+  end
+end