As Mr.Paichayon Said, He storing attachment on a file system, not it db. When you apply basic workflow on your documents. Automatically, created version of document, So when you update CMS_AttachmentHistory on AttachmentBinary field to null. After that when you try to edit document, file attachment will be lost.