20210609202149_create_login_activities.rb 400 B

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