From 2628cfe10e0a5cdbdb38d099b69521a1d910b24a Mon Sep 17 00:00:00 2001 From: Ari Timonen Date: Mon, 6 Apr 2020 05:52:39 +0300 Subject: [PATCH] Update scrypt migration --- db/migrate/20200401031518_update_passwords_to_scrypt.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20200401031518_update_passwords_to_scrypt.rb b/db/migrate/20200401031518_update_passwords_to_scrypt.rb index 86e49ad..36ed72a 100644 --- a/db/migrate/20200401031518_update_passwords_to_scrypt.rb +++ b/db/migrate/20200401031518_update_passwords_to_scrypt.rb @@ -5,7 +5,7 @@ class UpdatePasswordsToScrypt < ActiveRecord::Migration[6.0] def up 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) ActiveRecord::Base.transaction do User.all.order(:id).each do |user|