Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
class ConvertUsersTokensToAlwaysRememberMeClearance < ActiveRecord::Migration
def self.up
remove_index :users, :column => :token
remove_index :users, :column => [:id, :token]
remove_column :users, :token
remove_column :users, :token_expires_at
add_column :users, :confirmation_token, :string, :limit => 128
add_column :users, :remember_token, :string, :limit => 128
add_index :users, [:id, :confirmation_token]
add_index :users, :remember_token
end
def self.down
remove_index :users, :column => :remember_token
remove_index :users, :column => [:id, :confirmation_token]
remove_column :users, :remember_token
remove_column :users, :confirmation_token
add_column :users, :token_expires_at, :datetime
add_column :users, :token, :string, :limit => 128
add_index :users, :token
add_index :users, [:id, :token]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.