mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add "dormant" user state (#8644)
This commit is contained in:
@@ -250,3 +250,15 @@ SET
|
||||
WHERE
|
||||
id = $1
|
||||
RETURNING *;
|
||||
|
||||
|
||||
-- name: UpdateInactiveUsersToDormant :many
|
||||
UPDATE
|
||||
users
|
||||
SET
|
||||
status = 'dormant'::user_status,
|
||||
updated_at = @updated_at
|
||||
WHERE
|
||||
last_seen_at < @last_seen_after :: timestamp
|
||||
AND status = 'active'::user_status
|
||||
RETURNING id, email, last_seen_at;
|
||||
|
||||
Reference in New Issue
Block a user