chinwagsocial/db/migrate/20210609202149_create_login_activities.rb

17 lines
431 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2021-06-22 01:07:30 +10:00
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