1
0

20210609202149_create_login_activities.rb 431 B

12345678910111213141516
  1. # frozen_string_literal: true
  2. class CreateLoginActivities < ActiveRecord::Migration[6.1]
  3. def change
  4. create_table :login_activities do |t|
  5. t.belongs_to :user, null: false, foreign_key: { on_delete: :cascade }
  6. t.string :authentication_method
  7. t.string :provider
  8. t.boolean :success
  9. t.string :failure_reason
  10. t.inet :ip
  11. t.string :user_agent
  12. t.datetime :created_at
  13. end
  14. end
  15. end