Browse Source

Add password resets migration for Sorcery

master
Adrian Short 11 years ago
parent
commit
efd5d17c98
2 changed files with 19 additions and 3 deletions
  1. +13
    -0
      db/migrate/20130328153610_add_password_resets_to_users.rb
  2. +6
    -3
      db/schema.rb

+ 13
- 0
db/migrate/20130328153610_add_password_resets_to_users.rb View File

@@ -0,0 +1,13 @@
class AddPasswordResetsToUsers < ActiveRecord::Migration
def self.up
add_column :users, :reset_password_token, :string, :default => nil
add_column :users, :reset_password_token_expires_at, :datetime, :default => nil
add_column :users, :reset_password_email_sent_at, :datetime, :default => nil
end
def self.down
remove_column :users, :reset_password_email_sent_at
remove_column :users, :reset_password_token_expires_at
remove_column :users, :reset_password_token
end
end

+ 6
- 3
db/schema.rb View File

@@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.

ActiveRecord::Schema.define(:version => 20130326114555) do
ActiveRecord::Schema.define(:version => 20130328153610) do

create_table "delayed_jobs", :force => true do |t|
t.integer "priority", :default => 0
@@ -72,10 +72,13 @@ ActiveRecord::Schema.define(:version => 20130326114555) do
t.string "email"
t.string "crypted_password"
t.string "salt"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.string "remember_me_token"
t.datetime "remember_me_token_expires_at"
t.string "reset_password_token"
t.datetime "reset_password_token_expires_at"
t.datetime "reset_password_email_sent_at"
end

add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"


Loading…
Cancel
Save