From 3130dade498f2925ef91b3ae0f0bfe8c46dbe794 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Tue, 15 Mar 2016 16:44:42 -0400 Subject: [PATCH] Effectively remove new badges for now --- app/models/badge.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/badge.rb b/app/models/badge.rb index 467a7215791..0f9542ec7d5 100644 --- a/app/models/badge.rb +++ b/app/models/badge.rb @@ -202,7 +202,7 @@ SQL SELECT us.user_id, current_timestamp AS granted_at FROM user_stats AS us INNER JOIN posts AS p ON us.user_id = p.user_id - WHERE us.post_count > 5 + WHERE us.post_count > 500000 AND p.like_count > 0 AND (:backfill OR us.user_id IN (:user_ids)) GROUP BY us.user_id, us.post_count @@ -214,6 +214,7 @@ SQL FROM user_stats AS us INNER JOIN posts AS p ON us.user_id = p.user_id WHERE p.like_count > 0 + AND us.post_count > 50000 AND (:backfill OR us.user_id IN (:user_ids)) GROUP BY us.user_id HAVING us.likes_given::float / count(*) > 5.0