Class: SorceryRememberMe

Inherits:
ActiveRecord::Migration
  • Object
show all
Defined in:
lib/generators/sorcery_migration/templates/remember_me.rb

Class Method Summary collapse

Class Method Details

.downObject



9
10
11
12
13
14
# File 'lib/generators/sorcery_migration/templates/remember_me.rb', line 9

def self.down
  remove_index :users, :remember_me_token
  
  remove_column :users, :remember_me_token_expires_at
  remove_column :users, :remember_me_token
end

.upObject



2
3
4
5
6
7
# File 'lib/generators/sorcery_migration/templates/remember_me.rb', line 2

def self.up
  add_column :users, :remember_me_token, :string, :default => nil
  add_column :users, :remember_me_token_expires_at, :datetime, :default => nil
  
  add_index :users, :remember_me_token
end