J’ai cette requête d’explorateur de données que j’ai ajoutée en tant que rapport qui permet de vérifier mais n’envoie pas de notification « push » lorsqu’il y a une mise à jour.
SELECT
uh.action,
acting.username AS acting_user,
target.username AS target_user,
uh.updated_at
FROM user_histories uh
LEFT JOIN users acting ON acting.id = uh.acting_user_id
LEFT JOIN users target ON target.id = uh.target_user_id
WHERE uh.action = 88
AND uh.updated_at > CURRENT_DATE - INTERVAL '7 days'
ORDER BY uh.updated_at DESC
LIMIT 100