mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-13 13:21:29 +00:00
Fix migration - scrypt
This commit is contained in:
parent
3569f52d4a
commit
7ec70323bf
1 changed files with 1 additions and 2 deletions
|
@ -2,10 +2,9 @@
|
|||
ENV['SCRYPT_MAX_TIME'] ||= "0.03"
|
||||
class UpdatePasswordsToScrypt < ActiveRecord::Migration[6.0]
|
||||
require 'scrypt'
|
||||
require 'user'
|
||||
|
||||
def up
|
||||
SCrypt::Engine.calibrate!(max_time: ENV['SCRYPT_MAX_TIME'])
|
||||
SCrypt::Engine.calibrate!(max_time: ENV['SCRYPT_MAX_TIME'].to_f)
|
||||
ActiveRecord::Base.transaction do
|
||||
User.all.order(:id).each do |user|
|
||||
user.team = nil unless user&.team&.present?
|
||||
|
|
Loading…
Reference in a new issue