It appears that cleanup might just be missing in cases of error / bugs. Checking WoltLab.com this appears to affect a low 2-digit number of attachments. I would be fine with delaying this until the next larger upgrade nonetheless. It's no severe reliability issue and it might also affect the other apps.
SELECT *
FROM `wcf1_attachment`
WHERE objecttypeid IN
(SELECT objecttypeid
FROM wcf1_object_type
WHERE objecttype = 'com.woltlab.wcf.conversation.message'
AND definitionid IN
(SELECT definitionid
FROM wcf1_object_type_definition
WHERE definitionname = 'com.woltlab.wcf.attachment.objectType' ))
AND objectid NOT IN
(SELECT messageid
FROM wcf1_conversation_message);
It appears that cleanup might just be missing in cases of error / bugs. Checking WoltLab.com this appears to affect a low 2-digit number of attachments. I would be fine with delaying this until the next larger upgrade nonetheless. It's no severe reliability issue and it might also affect the other apps.
Originally posted by @TimWolla in https://github.com/WoltLab/com.woltlab.wcf.conversation/issues/157#issuecomment-925731970