-- Adds file attachment / voice note support to internal chat messages.
-- attachment_path stores only the generated filename inside uploads/messages/, not a full path.

ALTER TABLE `messages`
  ADD COLUMN `attachment_path` varchar(255) DEFAULT NULL AFTER `body`,
  ADD COLUMN `attachment_name` varchar(255) DEFAULT NULL AFTER `attachment_path`,
  ADD COLUMN `attachment_type` varchar(100) DEFAULT NULL AFTER `attachment_name`,
  ADD COLUMN `attachment_size` int(11) DEFAULT NULL AFTER `attachment_type`,
  ADD COLUMN `attachment_kind` enum('file','voice') DEFAULT NULL AFTER `attachment_size`;
