Sha256: f961c768d86ffa5e5ccd3315ea98fc08923fb1aa8d46d326ca4519f161535d21

Contents?: true

Size: 815 Bytes

Versions: 12

Compression:

Stored size: 815 Bytes

Contents

class SorceryResetPassword < ActiveRecord::Migration
  def self.up
    add_column :<%= model_class_name.tableize %>, :reset_password_token, :string, :default => nil
    add_column :<%= model_class_name.tableize %>, :reset_password_token_expires_at, :datetime, :default => nil
    add_column :<%= model_class_name.tableize %>, :reset_password_email_sent_at, :datetime, :default => nil
    
    add_index :<%= model_class_name.tableize %>, :reset_password_token
  end

  def self.down
    remove_index :<%= model_class_name.tableize %>, :reset_password_token
    
    remove_column :<%= model_class_name.tableize %>, :reset_password_email_sent_at
    remove_column :<%= model_class_name.tableize %>, :reset_password_token_expires_at
    remove_column :<%= model_class_name.tableize %>, :reset_password_token
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
sorcery-0.8.4 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.8.2 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.8.1 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.8.0 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.7.13 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.7.12 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.7.11 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.7.10 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.7.9 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.7.8 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.7.7 lib/generators/sorcery/templates/migration/reset_password.rb
sorcery-0.7.6 lib/generators/sorcery/templates/migration/reset_password.rb