Ver código fonte

Add password resets migration for Sorcery

master
Adrian Short 11 anos atrás
pai
commit
efd5d17c98
2 arquivos alterados com 19 adições e 3 exclusões
  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 Ver arquivo

@@ -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 Ver arquivo

@@ -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"


Carregando…
Cancelar
Salvar