From ca15d3ef40b0c87c638a1f1d60dc84c3ebc51730 Mon Sep 17 00:00:00 2001 From: Rolf Schmidt Date: Thu, 15 Jul 2021 13:31:46 +0100 Subject: [PATCH] Follow up cb3dced00252f3cfc930739050841008b9c1796b - Fixes #3617 - Reduce amount of migrated users to increase performance. --- db/migrate/20210622144000_issue_3617_user_image_source_fix.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20210622144000_issue_3617_user_image_source_fix.rb b/db/migrate/20210622144000_issue_3617_user_image_source_fix.rb index c89910757..5ab721328 100644 --- a/db/migrate/20210622144000_issue_3617_user_image_source_fix.rb +++ b/db/migrate/20210622144000_issue_3617_user_image_source_fix.rb @@ -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