-- offer_accepted notifications hardcoded link='/mensajes' instead of the
-- requirement page. Repoint existing rows at the matching requirement,
-- resolved via the requirement title stored in notifications.body.
UPDATE notifications n
JOIN requirements r ON r.title = n.body
SET n.link = CONCAT('/solicitud/', r.id)
WHERE n.type = 'offer_accepted' AND n.link = '/mensajes';
