34849-vm/db/migrations/082_create_hr_manuales_table.sql
2026-06-24 21:44:23 +00:00

30 lines
1.0 KiB
SQL

-- HR: Manuales y Capacitación
CREATE TABLE IF NOT EXISTS `hr_manuales` (
`id` INT AUTO_INCREMENT PRIMARY KEY,
`titulo` VARCHAR(255) NOT NULL,
`categoria` ENUM(
'Introducción a la Empresa',
'Manual de Ventas',
'Guía de Objeciones',
'Script Comercial',
'Atención al Cliente',
'Manual de Almacén',
'Manual de Inventario',
'Procedimientos Operativos',
'Políticas Internas',
'Marketing',
'Otros'
) NOT NULL,
`area` ENUM('General', 'Ventas', 'Almacén', 'Marketing', 'Administración') NOT NULL DEFAULT 'General',
`descripcion` TEXT,
`archivo_pdf_path` TEXT,
`archivo_word_path` TEXT,
`fecha_creacion` DATE NOT NULL,
`estado` ENUM('Activo', 'Inactivo') NOT NULL DEFAULT 'Activo',
`created_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`updated_at` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
KEY `idx_hr_manuales_categoria` (`categoria`),
KEY `idx_hr_manuales_area` (`area`),
KEY `idx_hr_manuales_estado` (`estado`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;