When deleting a document with an attachment that is missing data in xwikiattachment_content or xwikiattachment_archive the delete will fail.