Add authentication history (#16408)
This commit is contained in:
parent
946200b471
commit
d174d12c83
19 changed files with 206 additions and 21 deletions
14
db/migrate/20210609202149_create_login_activities.rb
Normal file
14
db/migrate/20210609202149_create_login_activities.rb
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue