Record and show the last time users have logged in

This commit is contained in:
Jyri-Petteri Paloposki 2020-08-10 16:54:48 +03:00
parent 950da89d76
commit 1936c90c95
4 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1,5 @@
class AddLastloginToUser < ActiveRecord::Migration[5.2]
def change
add_column :users, :last_login_at, :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_08_07_175610) do
ActiveRecord::Schema.define(version: 2020_08_10_123316) do
create_table "attachments", options: "ENGINE=InnoDB DEFAULT CHARSET=utf8", force: :cascade do |t|
t.integer "todo_id"
@ -223,6 +223,7 @@ ActiveRecord::Schema.define(version: 2020_08_07_175610) do
t.string "email"
t.datetime "created_at"
t.datetime "updated_at"
t.datetime "last_login_at"
t.index ["login"], name: "index_users_on_login"
end