-- SheListens — migration 010: file attachments in live sessions
-- session_messages already carries voice notes (voice_note_url); this adds
-- the equivalent columns for a general file/image attachment sent the same
-- way (see backend/api/session/attachment.php).
-- Run via phpMyAdmin or: mysql -u USER -p DBNAME < migrations/010_session_attachments.sql

ALTER TABLE session_messages
  ADD COLUMN attachment_url  VARCHAR(255) NULL AFTER voice_note_duration_sec,
  ADD COLUMN attachment_name VARCHAR(255) NULL AFTER attachment_url,
  ADD COLUMN attachment_mime VARCHAR(100) NULL AFTER attachment_name,
  ADD COLUMN attachment_size INT          NULL AFTER attachment_mime;
