DEV: add more counts to analyze missing

This commit is contained in:
Sam Saffron 2020-08-12 17:28:41 +10:00
parent 1f7f8ee72c
commit ec173a72d9
No known key found for this signature in database
GPG Key ID: B9606168D2FFD9F5

View File

@ -1037,6 +1037,18 @@ def analyze_missing
if count > 0
puts "Found #{count} uploaded avatars"
end
count = DB.query_single(<<~SQL, ids: ids).first
SELECT COUNT(*) FROM user_avatars WHERE gravatar_upload_id IN (:ids)
SQL
if count > 0
puts "Found #{count} gravatars"
end
count = DB.query_single(<<~SQL, ids: ids).first
SELECT COUNT(*) FROM user_avatars WHERE custom_upload_id IN (:ids)
SQL
if count > 0
puts "Found #{count} custom uploaded avatars"
end
end
end