added association tables for has_many through between documents and attachments