mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
Reference posts table for deleted_at and user_id (#8332)
This commit is contained in:
parent
20266325fc
commit
544a1379b6
@ -391,8 +391,8 @@ def update_users
|
||||
, MAX(p.created_at) max_created_at
|
||||
FROM posts p
|
||||
JOIN topics t ON t.id = p.topic_id AND t.archetype <> ?
|
||||
WHERE deleted_at IS NULL
|
||||
GROUP BY user_id
|
||||
WHERE p.deleted_at IS NULL
|
||||
GROUP BY p.user_id
|
||||
)
|
||||
UPDATE users
|
||||
SET first_seen_at = X.min_created_at
|
||||
|
Loading…
x
Reference in New Issue
Block a user