mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 02:19:27 +08:00
DEV: add more counts to analyze missing
This commit is contained in:
parent
1f7f8ee72c
commit
ec173a72d9
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user