diff --git a/lib/file_store/to_s3_migration.rb b/lib/file_store/to_s3_migration.rb index 85af5a58082..9af8aa3994d 100644 --- a/lib/file_store/to_s3_migration.rb +++ b/lib/file_store/to_s3_migration.rb @@ -135,8 +135,8 @@ module FileStore end def uploads_migrated_to_new_scheme? - seeded_image_url = "#{GlobalSetting.relative_url_root}/uploads/#{@current_db}/original/_X/" - !Upload.by_users.where("url NOT LIKE '//%' AND url NOT LIKE '#{seeded_image_url}%'").exists? + seeded_image_url = "uploads/#{@current_db}/original/_X/" + !Upload.by_users.where("url NOT LIKE '//%' AND url NOT LIKE '/%#{seeded_image_url}%'").exists? end def migrate_to_s3