mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-27 11:40:57 +00:00
Update scrypt migration
This commit is contained in:
parent
4da3f38d25
commit
2628cfe10e
1 changed files with 1 additions and 1 deletions
|
@ -5,7 +5,7 @@ class UpdatePasswordsToScrypt < ActiveRecord::Migration[6.0]
|
||||||
|
|
||||||
def up
|
def up
|
||||||
puts("SCRYPT_MAX_TIME=%s" % ENV['SCRYPT_MAX_TIME'])
|
puts("SCRYPT_MAX_TIME=%s" % ENV['SCRYPT_MAX_TIME'])
|
||||||
puts("Migration takes about %0.0f seconds." % ENV['SCRYPT_MAX_TIME'].to_f*User.all.count)
|
puts("Migration takes about %0.0f seconds." % ENV['SCRYPT_MAX_TIME'].to_f*User.all.count*3)
|
||||||
SCrypt::Engine.calibrate!(max_time: ENV['SCRYPT_MAX_TIME'].to_f)
|
SCrypt::Engine.calibrate!(max_time: ENV['SCRYPT_MAX_TIME'].to_f)
|
||||||
ActiveRecord::Base.transaction do
|
ActiveRecord::Base.transaction do
|
||||||
User.all.order(:id).each do |user|
|
User.all.order(:id).each do |user|
|
||||||
|
|
Loading…
Reference in a new issue