Follow up cb3dced002 - Fixes #3617 - Reduce amount of migrated users to increase performance.

This commit is contained in:
Rolf Schmidt 2021-07-15 13:31:46 +01:00 committed by Thorsten Eckel
parent 76f613d9ea
commit ca15d3ef40

View file

@ -4,7 +4,7 @@ class Issue3617UserImageSourceFix < ActiveRecord::Migration[5.2]
def change
return if !Setting.exists?(name: 'system_init_done')
User.where.not(image_source: nil).find_each do |user|
User.where("image_source NOT LIKE 'http%'").find_each do |user|
user.remove_invalid_image_source
user.save!
end