Data migration to create external_attachments.
Remove external references in consultations.
Remove special case from attachment_required.
Front-end functional test.