-- -------------------------------------------------------- -- Host: 127.0.0.1 -- Versión del servidor: 8.0.30 - MySQL Community Server - GPL -- SO del servidor: Win64 -- HeidiSQL Versión: 12.1.0.6537 -- -------------------------------------------------------- /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET NAMES utf8 */; /*!50503 SET NAMES utf8mb4 */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- Volcando estructura de base de datos para admision_2026 DROP DATABASE IF EXISTS `admision_2026`; CREATE DATABASE IF NOT EXISTS `admision_2026` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */; USE `admision_2026`; -- Volcando estructura para tabla admision_2026.areas DROP TABLE IF EXISTS `areas`; CREATE TABLE IF NOT EXISTS `areas` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `nombre` varchar(100) NOT NULL, `codigo` varchar(20) NOT NULL, `descripcion` varchar(500) DEFAULT NULL, `activo` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `codigo` (`codigo`), KEY `idx_areas_activo` (`activo`), KEY `idx_areas_codigo` (`codigo`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.areas_admision DROP TABLE IF EXISTS `areas_admision`; CREATE TABLE IF NOT EXISTS `areas_admision` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `nombre` varchar(150) NOT NULL, `descripcion` text, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.area_curso DROP TABLE IF EXISTS `area_curso`; CREATE TABLE IF NOT EXISTS `area_curso` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `area_id` bigint unsigned NOT NULL, `curso_id` bigint unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, KEY `fk_area_curso_area` (`area_id`) USING BTREE, KEY `fk_area_curso_curso` (`curso_id`) USING BTREE, CONSTRAINT `fk_area_curso_area` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_area_curso_curso` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.area_proceso DROP TABLE IF EXISTS `area_proceso`; CREATE TABLE IF NOT EXISTS `area_proceso` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `area_id` bigint unsigned NOT NULL, `proceso_id` bigint unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `area_proceso_unique` (`area_id`,`proceso_id`), KEY `fk_area_proceso_proceso` (`proceso_id`), CONSTRAINT `fk_area_proceso_area` FOREIGN KEY (`area_id`) REFERENCES `areas` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_area_proceso_proceso` FOREIGN KEY (`proceso_id`) REFERENCES `procesos` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.cache DROP TABLE IF EXISTS `cache`; CREATE TABLE IF NOT EXISTS `cache` ( `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `expiration` int NOT NULL, PRIMARY KEY (`key`), KEY `cache_expiration_index` (`expiration`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.cache_locks DROP TABLE IF EXISTS `cache_locks`; CREATE TABLE IF NOT EXISTS `cache_locks` ( `key` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `owner` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `expiration` int NOT NULL, PRIMARY KEY (`key`), KEY `cache_locks_expiration_index` (`expiration`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.cursos DROP TABLE IF EXISTS `cursos`; CREATE TABLE IF NOT EXISTS `cursos` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `nombre` varchar(100) NOT NULL, `codigo` varchar(20) NOT NULL, `descripcion` varchar(500) DEFAULT NULL, `activo` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `codigo` (`codigo`), KEY `idx_cursos_activo` (`activo`), KEY `idx_cursos_codigo` (`codigo`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.examenes DROP TABLE IF EXISTS `examenes`; CREATE TABLE IF NOT EXISTS `examenes` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `postulante_id` bigint unsigned NOT NULL, `area_proceso_id` bigint unsigned NOT NULL, `pagado` tinyint(1) NOT NULL DEFAULT '0', `tipo_pago` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pago_id` decimal(20,6) DEFAULT '0.000000', `intentos` int NOT NULL DEFAULT '0', `hora_inicio` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, KEY `examenes_postulante_id_foreign` (`postulante_id`) USING BTREE, KEY `examenes_area_proceso_id_foreign` (`area_proceso_id`) USING BTREE, CONSTRAINT `examenes_area_proceso_id_foreign` FOREIGN KEY (`area_proceso_id`) REFERENCES `area_proceso` (`id`) ON DELETE CASCADE, CONSTRAINT `examenes_postulante_id_foreign` FOREIGN KEY (`postulante_id`) REFERENCES `postulantes` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.failed_jobs DROP TABLE IF EXISTS `failed_jobs`; CREATE TABLE IF NOT EXISTS `failed_jobs` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `uuid` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.jobs DROP TABLE IF EXISTS `jobs`; CREATE TABLE IF NOT EXISTS `jobs` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `queue` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `attempts` tinyint unsigned NOT NULL, `reserved_at` int unsigned DEFAULT NULL, `available_at` int unsigned NOT NULL, `created_at` int unsigned NOT NULL, PRIMARY KEY (`id`), KEY `jobs_queue_index` (`queue`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.job_batches DROP TABLE IF EXISTS `job_batches`; CREATE TABLE IF NOT EXISTS `job_batches` ( `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `total_jobs` int NOT NULL, `pending_jobs` int NOT NULL, `failed_jobs` int NOT NULL, `failed_job_ids` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `options` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `cancelled_at` int DEFAULT NULL, `created_at` int NOT NULL, `finished_at` int DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.migrations DROP TABLE IF EXISTS `migrations`; CREATE TABLE IF NOT EXISTS `migrations` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.model_has_permissions DROP TABLE IF EXISTS `model_has_permissions`; CREATE TABLE IF NOT EXISTS `model_has_permissions` ( `permission_id` bigint unsigned NOT NULL, `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint unsigned NOT NULL, PRIMARY KEY (`permission_id`,`model_id`,`model_type`), KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`), CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.model_has_roles DROP TABLE IF EXISTS `model_has_roles`; CREATE TABLE IF NOT EXISTS `model_has_roles` ( `role_id` bigint unsigned NOT NULL, `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `model_id` bigint unsigned NOT NULL, PRIMARY KEY (`role_id`,`model_id`,`model_type`), KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`), CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.pagos DROP TABLE IF EXISTS `pagos`; CREATE TABLE IF NOT EXISTS `pagos` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `postulante_id` bigint unsigned NOT NULL, `tipo_pago` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `codigo_pago` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `utilizado` tinyint(1) NOT NULL DEFAULT '0', `monto` decimal(10,2) NOT NULL, `original_date` timestamp NULL DEFAULT NULL, `confirmed_date` timestamp NULL DEFAULT NULL, `fecha_pago` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE, UNIQUE KEY `pagos_codigo_pago_unique` (`codigo_pago`) USING BTREE, KEY `pagos_postulante_id_foreign` (`postulante_id`) USING BTREE, CONSTRAINT `pagos_postulante_id_foreign` FOREIGN KEY (`postulante_id`) REFERENCES `postulantes` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.password_reset_tokens DROP TABLE IF EXISTS `password_reset_tokens`; CREATE TABLE IF NOT EXISTS `password_reset_tokens` ( `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.permissions DROP TABLE IF EXISTS `permissions`; CREATE TABLE IF NOT EXISTS `permissions` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.personal_access_tokens DROP TABLE IF EXISTS `personal_access_tokens`; CREATE TABLE IF NOT EXISTS `personal_access_tokens` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tokenable_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `tokenable_id` bigint unsigned NOT NULL, `name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `abilities` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `last_used_at` timestamp NULL DEFAULT NULL, `expires_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `personal_access_tokens_token_unique` (`token`), KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`), KEY `personal_access_tokens_expires_at_index` (`expires_at`) ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.postulantes DROP TABLE IF EXISTS `postulantes`; CREATE TABLE IF NOT EXISTS `postulantes` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `email` varchar(255) NOT NULL, `password` varchar(255) NOT NULL, `dni` varchar(20) NOT NULL, `device_id` varchar(100) DEFAULT NULL, `last_activity` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `email` (`email`), UNIQUE KEY `dni` (`dni`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.preguntas DROP TABLE IF EXISTS `preguntas`; CREATE TABLE IF NOT EXISTS `preguntas` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `curso_id` bigint unsigned NOT NULL, `enunciado` longtext NOT NULL, `enunciado_adicional` longtext, `opciones` json DEFAULT NULL, `respuesta_correcta` longtext, `explicacion` longtext, `imagenes_explicacion` json DEFAULT NULL, `imagenes` json DEFAULT NULL, `nivel_dificultad` varchar(20) DEFAULT NULL, `activo` tinyint(1) NOT NULL DEFAULT '1', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_preguntas_curso` (`curso_id`), KEY `idx_preguntas_activo` (`activo`), CONSTRAINT `fk_preguntas_curso` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.preguntas_asignadas DROP TABLE IF EXISTS `preguntas_asignadas`; CREATE TABLE IF NOT EXISTS `preguntas_asignadas` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `examen_id` bigint unsigned NOT NULL, `pregunta_id` bigint unsigned NOT NULL, `orden` int NOT NULL, `respuesta_usuario` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Clave elegida (A, B, C, D) o texto si es abierta', `es_correcta` tinyint(1) DEFAULT NULL COMMENT '1 correcta, 0 incorrecta, NULL no respondida', `estado` enum('pendiente','respondida','anulada') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pendiente', `puntaje` decimal(5,2) NOT NULL DEFAULT '0.00', `respondida_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) USING BTREE, KEY `idx_preg_asig_examen` (`examen_id`) USING BTREE, KEY `idx_preg_asig_pregunta` (`pregunta_id`) USING BTREE, KEY `idx_preg_asig_estado` (`estado`) USING BTREE, CONSTRAINT `fk_preg_asig_examen` FOREIGN KEY (`examen_id`) REFERENCES `examenes` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_preg_asig_pregunta` FOREIGN KEY (`pregunta_id`) REFERENCES `preguntas` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.procesos DROP TABLE IF EXISTS `procesos`; CREATE TABLE IF NOT EXISTS `procesos` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `descripcion` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `estado` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'borrador', `duracion` int NOT NULL COMMENT 'Duración total en minutos', `intentos_maximos` int DEFAULT '1', `requiere_pago` tinyint(1) NOT NULL DEFAULT '0', `precio` decimal(8,2) DEFAULT NULL, `calificacion_id` bigint unsigned DEFAULT NULL, `slug` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `tipo_simulacro` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'simulacro | test | practica', `tipo_proceso` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'admision | preuniversitario | universitario', `activo` tinyint(1) NOT NULL DEFAULT '1', `publico` tinyint(1) NOT NULL DEFAULT '0', `fecha_inicio` datetime DEFAULT NULL, `fecha_fin` datetime DEFAULT NULL, `tiempo_por_pregunta` int DEFAULT NULL COMMENT 'Segundos por pregunta', `cantidad_pregunta` int DEFAULT '10', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `slug` (`slug`), KEY `idx_examenes_estado` (`estado`), KEY `idx_examenes_activo` (`activo`), KEY `idx_examenes_publico` (`publico`), KEY `idx_examenes_tipo_simulacro` (`tipo_simulacro`), KEY `idx_examenes_tipo_proceso` (`tipo_proceso`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.procesos_admision DROP TABLE IF EXISTS `procesos_admision`; CREATE TABLE IF NOT EXISTS `procesos_admision` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `titulo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `subtitulo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `descripcion` text COLLATE utf8mb4_unicode_ci, `slug` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL, `tipo_proceso` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `modalidad` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `publicado` tinyint(1) NOT NULL DEFAULT '0', `fecha_publicacion` datetime DEFAULT NULL, `fecha_inicio_preinscripcion` datetime DEFAULT NULL, `fecha_fin_preinscripcion` datetime DEFAULT NULL, `fecha_inicio_inscripcion` datetime DEFAULT NULL, `fecha_fin_inscripcion` datetime DEFAULT NULL, `fecha_examen1` datetime DEFAULT NULL, `fecha_examen2` datetime DEFAULT NULL, `fecha_resultados` datetime DEFAULT NULL, `fecha_inicio_biometrico` datetime DEFAULT NULL, `fecha_fin_biometrico` datetime DEFAULT NULL, `imagen_path` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `banner_path` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `brochure_path` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `link_preinscripcion` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `link_inscripcion` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `link_resultados` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `link_reglamento` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `estado` enum('nuevo','publicado','en_proceso','finalizado','cancelado') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'nuevo', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uq_procesos_slug` (`slug`), KEY `idx_procesos_publico` (`publicado`,`estado`), KEY `idx_procesos_fechas` (`fecha_inicio_inscripcion`,`fecha_examen1`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.proceso_admision_detalles DROP TABLE IF EXISTS `proceso_admision_detalles`; CREATE TABLE IF NOT EXISTS `proceso_admision_detalles` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `proceso_admision_id` bigint unsigned NOT NULL, `tipo` enum('requisitos','pagos','vacantes','cronograma') COLLATE utf8mb4_unicode_ci NOT NULL, `titulo_detalle` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `descripcion` text COLLATE utf8mb4_unicode_ci, `listas` json DEFAULT NULL, `meta` json DEFAULT NULL, `url` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `imagen_path` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `imagen_path_2` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `uq_proceso_modalidad_tipo` (`proceso_admision_id`), KEY `idx_detalles_lookup` (`proceso_admision_id`,`tipo`), CONSTRAINT `fk_detalles_proceso` FOREIGN KEY (`proceso_admision_id`) REFERENCES `procesos_admision` (`id`) ON DELETE CASCADE, CONSTRAINT `proceso_admision_detalles_chk_1` CHECK (json_valid(`listas`)), CONSTRAINT `proceso_admision_detalles_chk_2` CHECK (json_valid(`meta`)) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.reglas_area_proceso DROP TABLE IF EXISTS `reglas_area_proceso`; CREATE TABLE IF NOT EXISTS `reglas_area_proceso` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `area_proceso_id` bigint unsigned NOT NULL, `curso_id` bigint unsigned NOT NULL, `cantidad_preguntas` int NOT NULL DEFAULT '0', `orden` int NOT NULL DEFAULT '1', `nivel_dificultad` varchar(50) DEFAULT 'medio', `ponderacion` decimal(5,2) DEFAULT '0.00', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `area_proceso_id` (`area_proceso_id`), KEY `curso_id` (`curso_id`), CONSTRAINT `reglas_area_proceso_ibfk_1` FOREIGN KEY (`area_proceso_id`) REFERENCES `area_proceso` (`id`), CONSTRAINT `reglas_area_proceso_ibfk_2` FOREIGN KEY (`curso_id`) REFERENCES `cursos` (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.resultados_admision DROP TABLE IF EXISTS `resultados_admision`; CREATE TABLE IF NOT EXISTS `resultados_admision` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `dni` varchar(20) NOT NULL, `paterno` varchar(100) NOT NULL, `materno` varchar(100) NOT NULL, `nombres` varchar(150) NOT NULL, `puntaje` decimal(6,2) DEFAULT '0.00', `vocacional` decimal(6,2) DEFAULT '0.00', `apto` enum('SI','NO') DEFAULT 'NO', `obs` text, `desprograma` tinyint(1) DEFAULT '0', `idproceso` bigint unsigned NOT NULL, `idearea` bigint unsigned NOT NULL, `litho` varchar(50) DEFAULT NULL, `numlectura` varchar(50) DEFAULT NULL, `tipo` varchar(50) DEFAULT NULL, `calificar` tinyint(1) DEFAULT '1', `aula` varchar(50) DEFAULT NULL, `respuestas` json DEFAULT NULL, `puesto` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_dni` (`dni`), KEY `idx_proceso` (`idproceso`), KEY `idx_area` (`idearea`), CONSTRAINT `fk_resultado_area_admision` FOREIGN KEY (`idearea`) REFERENCES `areas_admision` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_resultado_proceso_admision` FOREIGN KEY (`idproceso`) REFERENCES `procesos_admision` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.resultados_admision_carga DROP TABLE IF EXISTS `resultados_admision_carga`; CREATE TABLE IF NOT EXISTS `resultados_admision_carga` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `dni` varchar(20) DEFAULT NULL, `paterno` varchar(100) DEFAULT NULL, `materno` varchar(100) DEFAULT NULL, `nombres` varchar(150) DEFAULT NULL, `idproceso` bigint unsigned NOT NULL, `idearea` bigint unsigned NOT NULL, `apto` char(20) DEFAULT NULL, `puntaje_total` decimal(8,2) DEFAULT NULL, `puesto` int DEFAULT NULL, `correctas_aritmetica` int DEFAULT NULL, `blancas_aritmetica` int DEFAULT NULL, `puntaje_aritmetica` decimal(6,2) DEFAULT NULL, `porcentaje_aritmetica` decimal(5,2) DEFAULT NULL, `correctas_algebra` int DEFAULT NULL, `blancas_algebra` int DEFAULT NULL, `puntaje_algebra` decimal(6,2) DEFAULT NULL, `porcentaje_algebra` decimal(5,2) DEFAULT NULL, `correctas_geometria` int DEFAULT NULL, `blancas_geometria` int DEFAULT NULL, `puntaje_geometria` decimal(6,2) DEFAULT NULL, `porcentaje_geometria` decimal(5,2) DEFAULT NULL, `correctas_trigonometria` int DEFAULT NULL, `blancas_trigonometria` int DEFAULT NULL, `puntaje_trigonometria` decimal(6,2) DEFAULT NULL, `porcentaje_trigonometria` decimal(5,2) DEFAULT NULL, `correctas_fisica` int DEFAULT NULL, `blancas_fisica` int DEFAULT NULL, `puntaje_fisica` decimal(6,2) DEFAULT NULL, `porcentaje_fisica` decimal(5,2) DEFAULT NULL, `correctas_quimica` int DEFAULT NULL, `blancas_quimica` int DEFAULT NULL, `puntaje_quimica` decimal(6,2) DEFAULT NULL, `porcentaje_quimica` decimal(5,2) DEFAULT NULL, `correctas_biologia_anatomia` int DEFAULT NULL, `blancas_biologia_anatomia` int DEFAULT NULL, `puntaje_biologia_anatomia` decimal(6,2) DEFAULT NULL, `porcentaje_biologia_anatomia` decimal(5,2) DEFAULT NULL, `correctas_psicologia_filosofia` int DEFAULT NULL, `blancas_psicologia_filosofia` int DEFAULT NULL, `puntaje_psicologia_filosofia` decimal(6,2) DEFAULT NULL, `porcentaje_psicologia_filosofia` decimal(5,2) DEFAULT NULL, `correctas_geografia` int DEFAULT NULL, `blancas_geografia` int DEFAULT NULL, `puntaje_geografia` decimal(6,2) DEFAULT NULL, `porcentaje_geografia` decimal(5,2) DEFAULT NULL, `correctas_historia` int DEFAULT NULL, `blancas_historia` int DEFAULT NULL, `puntaje_historia` decimal(6,2) DEFAULT NULL, `porcentaje_historia` decimal(5,2) DEFAULT NULL, `correctas_educacion_civica` int DEFAULT NULL, `blancas_educacion_civica` int DEFAULT NULL, `puntaje_educacion_civica` decimal(6,2) DEFAULT NULL, `porcentaje_educacion_civica` decimal(5,2) DEFAULT NULL, `correctas_economia` int DEFAULT NULL, `blancas_economia` int DEFAULT NULL, `puntaje_economia` decimal(6,2) DEFAULT NULL, `porcentaje_economia` decimal(5,2) DEFAULT NULL, `correctas_comunicacion` int DEFAULT NULL, `blancas_comunicacion` int DEFAULT NULL, `puntaje_comunicacion` decimal(6,2) DEFAULT NULL, `porcentaje_comunicacion` decimal(5,2) DEFAULT NULL, `correctas_literatura` int DEFAULT NULL, `blancas_literatura` int DEFAULT NULL, `puntaje_literatura` decimal(6,2) DEFAULT NULL, `porcentaje_literatura` decimal(5,2) DEFAULT NULL, `correctas_razonamiento_matematico` int DEFAULT NULL, `blancas_razonamiento_matematico` int DEFAULT NULL, `puntaje_razonamiento_matematico` decimal(6,2) DEFAULT NULL, `porcentaje_razonamiento_matematico` decimal(5,2) DEFAULT NULL, `correctas_razonamiento_verbal` int DEFAULT NULL, `blancas_razonamiento_verbal` int DEFAULT NULL, `puntaje_razonamiento_verbal` decimal(6,2) DEFAULT NULL, `porcentaje_razonamiento_verbal` decimal(5,2) DEFAULT NULL, `correctas_ingles` int DEFAULT NULL, `blancas_ingles` int DEFAULT NULL, `puntaje_ingles` decimal(6,2) DEFAULT NULL, `porcentaje_ingles` decimal(5,2) DEFAULT NULL, `correctas_quechua_aimara` int DEFAULT NULL, `blancas_quechua_aimara` int DEFAULT NULL, `puntaje_quechua_aimara` decimal(6,2) DEFAULT NULL, `porcentaje_quechua_aimara` decimal(5,2) DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `idx_dni` (`dni`), KEY `idx_proceso_area` (`idproceso`,`idearea`), KEY `fk_carga_area` (`idearea`), CONSTRAINT `fk_carga_area` FOREIGN KEY (`idearea`) REFERENCES `areas_admision` (`id`) ON DELETE CASCADE, CONSTRAINT `fk_carga_proceso` FOREIGN KEY (`idproceso`) REFERENCES `procesos_admision` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.roles DROP TABLE IF EXISTS `roles`; CREATE TABLE IF NOT EXISTS `roles` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.role_has_permissions DROP TABLE IF EXISTS `role_has_permissions`; CREATE TABLE IF NOT EXISTS `role_has_permissions` ( `permission_id` bigint unsigned NOT NULL, `role_id` bigint unsigned NOT NULL, PRIMARY KEY (`permission_id`,`role_id`), KEY `role_has_permissions_role_id_foreign` (`role_id`), CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE, CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.sessions DROP TABLE IF EXISTS `sessions`; CREATE TABLE IF NOT EXISTS `sessions` ( `id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` bigint unsigned DEFAULT NULL, `ip_address` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `last_activity` int NOT NULL, PRIMARY KEY (`id`), KEY `sessions_user_id_index` (`user_id`), KEY `sessions_last_activity_index` (`last_activity`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. -- Volcando estructura para tabla admision_2026.users DROP TABLE IF EXISTS `users`; CREATE TABLE IF NOT EXISTS `users` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `users_email_unique` (`email`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- La exportación de datos fue deseleccionada. /*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */; /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */; /*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;