Insert new feature: attachments for motions.

Fixed #522. Database struture changed.