-- Migración: agregar columna `canal` a la tabla conversations -- Permite distinguir mensajes del bot (canal='bot') del turnero (canal='turnero') -- Todos los registros existentes quedan como 'bot' (sin pérdida de datos) ALTER TABLE `conversations` ADD COLUMN IF NOT EXISTS `canal` VARCHAR(20) NOT NULL DEFAULT 'bot' AFTER `status`; ALTER TABLE `conversations` ADD INDEX IF NOT EXISTS `idx_conversations_canal` (`canal`);