40097-vm/db/migrations/074_create_historial_llamadas_table.sql
2026-05-25 03:18:40 +00:00

13 lines
613 B
SQL

-- Create call history table for the Call Center test panel.
CREATE TABLE IF NOT EXISTS `historial_llamadas` (
`id` INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
`pedido_id` VARCHAR(80) NOT NULL,
`asesor_id` INT UNSIGNED NOT NULL,
`resultado` VARCHAR(120) NOT NULL,
`observacion` TEXT NULL,
`fecha_llamada` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
INDEX `idx_historial_llamadas_pedido` (`pedido_id`),
INDEX `idx_historial_llamadas_asesor` (`asesor_id`),
INDEX `idx_historial_llamadas_fecha` (`fecha_llamada`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;