ALTER TABLE team_messages
  ADD COLUMN attachment_file_id CHAR(36) NULL AFTER body_text;

ALTER TABLE team_messages
  ADD KEY idx_team_messages_attachment_file (attachment_file_id);

ALTER TABLE team_messages
  ADD CONSTRAINT fk_team_messages_attachment_file
    FOREIGN KEY (attachment_file_id) REFERENCES files (id);
