Files
Redmine/db/migrate/20110223180953_salt_user_passwords.rb
Go MAEDA 7ba7a19cf6 Remove trailing whitespaces from db/migrate (#31506).
Patch by Marius BALTEANU.


git-svn-id: http://svn.redmine.org/redmine/trunk@18232 e93f8b46-1217-0410-a6f0-8f06a7374b81
2019-06-06 14:51:25 +00:00

14 lines
387 B
Ruby

class SaltUserPasswords < ActiveRecord::Migration[4.2]
def self.up
say_with_time "Salting user passwords, this may take some time..." do
User.salt_unsalted_passwords!
end
end
def self.down
# Unsalted passwords can not be restored
raise ActiveRecord::IrreversibleMigration, "Can't decypher salted passwords. This migration can not be rollback'ed."
end
end