scube-server/db/migrate/20110809130610_add_password_hash_to_users.rb
Thibault Jouan 1fc3be42de Save user password as a bcrypt hash
* Replace password field by password_hash
* Add User#password attribute
* Implement password hashing and verification with BCrypt mixin
2011-08-09 17:04:47 +00:00

12 lines
268 B
Ruby

class AddPasswordHashToUsers < ActiveRecord::Migration
def self.up
add_column :users, :password_hash, :string
remove_column :users, :password
end
def self.down
remove_column :users, :password_hash
add_column :users, :password, :string
end
end