diaspora/db/migrate/20110518184453_add_token_auth_to_user.rb
2011-05-19 11:57:06 -07:00

11 lines
337 B
Ruby

class AddTokenAuthToUser < ActiveRecord::Migration
def self.up
add_column(:users, :authentication_token, :string, :limit => 30)
add_index(:users, :authentication_token, :unique => true)
end
def self.down
remove_index(:users, :column => :authentication_token)
remove_column(:users, :authentication_token)
end
end