feat(jobs/runners): attachment cleanup + chat DeleteAttachments query/method

This commit is contained in:
2026-05-06 08:07:49 +08:00
parent c50621eeca
commit f56fe449fd
7 changed files with 193 additions and 0 deletions
+3
View File
@@ -30,3 +30,6 @@ JOIN messages m ON m.id = a.message_id
JOIN conversations c ON c.id = m.conversation_id
WHERE c.deleted_at IS NOT NULL
AND c.deleted_at < NOW() - ($1::interval);
-- name: DeleteAttachmentsByIDs :exec
DELETE FROM message_attachments WHERE id = ANY($1::uuid[]);