mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-15 22:30:53 +00:00
15 lines
308 B
Ruby
15 lines
308 B
Ruby
|
class UpdatePasswordsToScrypt < ActiveRecord::Migration[6.0]
|
||
|
require 'scrypt'
|
||
|
require 'user'
|
||
|
|
||
|
def up
|
||
|
SCrypt::Engine.calibrate!(max_time: 0.03)
|
||
|
ActiveRecord::Base.transaction do
|
||
|
User.all.order(:id).each do |user|
|
||
|
user.update_password
|
||
|
user.save!
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|