Job exception: PG::Error: ERROR: column q.post_id does not exist
LINE 15: ...RE (ub.badge_id IS NULL AND q.user_id <> -1) AND (q.post_id ...
: INSERT INTO user_badges(badge_id, user_id, granted_at, granted_by_id, post_id)
SELECT 139, q.user_id, q.granted_at, -1, NULL
FROM ( SELECT user_id, current_timestamp granted_at FROM badge_posts where topic_id not in (
SELECT topic_id FROM badge_posts GROUP BY topic_id HAVING count(topic_id) <4
) and topic_id not in (
) GROUP BY user_id HAVING count(*) >= 512 ) q
LEFT JOIN user_badges ub ON
ub.badge_id = 139 AND ub.user_id = q.user_id
WHERE (ub.badge_id IS NULL AND q.user_id <> -1) AND (q.post_id in (64971))
RETURNING id, user_id, granted_at
Which I guess is the 2^x badge series around awarding badges for certain post counts? And the attendance badge too?
I disabled those badge series in
/admin/badges to see if that helps.
I suspect all users with post counts > whatever the threshold is might be affected when they post?