mirror of
https://github.com/redmine/redmine.git
synced 2025-10-26 00:36:14 +02:00
git-svn-id: https://svn.redmine.org/redmine/trunk@22949 e93f8b46-1217-0410-a6f0-8f06a7374b81
13 lines
386 B
Ruby
13 lines
386 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
|