password reset requests

This commit is contained in:
Mark Moser
2016-08-24 15:02:32 -05:00
parent 963517e4bb
commit 7b51d26295
12 changed files with 156 additions and 20 deletions

View File

@ -0,0 +1,8 @@
class AddResetsToUsers < ActiveRecord::Migration[5.0]
def change
add_column :users, :reset_token, :string
add_column :users, :reset_timestamp, :datetime
add_index :users, :reset_token
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: 20160818225721) do
ActiveRecord::Schema.define(version: 20160824183159) do
create_table "answers", force: :cascade, options: "ENGINE=InnoDB DEFAULT CHARSET=utf8" do |t|
t.integer "candidate_id"
@ -73,6 +73,9 @@ ActiveRecord::Schema.define(version: 20160818225721) do
t.boolean "active"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.string "reset_token"
t.datetime "reset_timestamp"
t.index ["reset_token"], name: "index_users_on_reset_token", using: :btree
end
end