Added field to track users last login (#2367)

This commit is contained in:
Ahmad Farhat
2020-12-14 18:52:08 -05:00
committed by GitHub
parent 7a2405aa9e
commit 14350c5f5d
5 changed files with 41 additions and 1 deletions

View File

@ -0,0 +1,7 @@
# frozen_string_literal: true
class AddLastLoginToUsers < ActiveRecord::Migration[5.2]
def change
add_column :users, :last_login, :datetime
end
end

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2020_06_15_190507) do
ActiveRecord::Schema.define(version: 2020_12_14_232153) do
create_table "active_storage_attachments", force: :cascade do |t|
t.string "name", null: false
@ -142,6 +142,7 @@ ActiveRecord::Schema.define(version: 2020_06_15_190507) do
t.datetime "activated_at"
t.boolean "deleted", default: false, null: false
t.integer "role_id"
t.datetime "last_login"
t.index ["created_at"], name: "index_users_on_created_at"
t.index ["deleted"], name: "index_users_on_deleted"
t.index ["email"], name: "index_users_on_email"