re #842 - Sync attachments and activities with new primary keys