diff --git a/db/migrate/20130328153610_add_password_resets_to_users.rb b/db/migrate/20130328153610_add_password_resets_to_users.rb new file mode 100644 index 0000000..593a7a1 --- /dev/null +++ b/db/migrate/20130328153610_add_password_resets_to_users.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index dead5cd..449b8d3 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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"