feat: dockerizar proyecto para produccion

main
parent 575b70439c
commit 3e205ae76a

@ -1,59 +1,19 @@
-- --------------------------------------------------------
-- 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
-- --------------------------------------------------------
mysqldump: [Warning] Using a password on the command line interface can be insecure.
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!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` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `area_curso` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`area_id` bigint unsigned NOT NULL,
`curso_id` bigint unsigned NOT NULL,
@ -65,12 +25,11 @@ CREATE TABLE IF NOT EXISTS `area_curso` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `area_proceso`;
CREATE TABLE IF NOT EXISTS `area_proceso` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `area_proceso` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`area_id` bigint unsigned NOT NULL,
`proceso_id` bigint unsigned NOT NULL,
@ -82,36 +41,62 @@ CREATE TABLE IF NOT EXISTS `area_proceso` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `areas`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `areas_admision`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cache`;
CREATE TABLE IF NOT EXISTS `cache` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cache_locks`;
CREATE TABLE IF NOT EXISTS `cache_locks` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `cursos`;
CREATE TABLE IF NOT EXISTS `cursos` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `cursos` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`nombre` varchar(100) NOT NULL,
`codigo` varchar(20) NOT NULL,
@ -124,12 +109,11 @@ CREATE TABLE IF NOT EXISTS `cursos` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `examenes`;
CREATE TABLE IF NOT EXISTS `examenes` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `examenes` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`postulante_id` bigint unsigned NOT NULL,
`area_proceso_id` bigint unsigned NOT NULL,
@ -146,12 +130,11 @@ CREATE TABLE IF NOT EXISTS `examenes` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `failed_jobs`;
CREATE TABLE IF NOT EXISTS `failed_jobs` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -162,28 +145,11 @@ CREATE TABLE IF NOT EXISTS `failed_jobs` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `job_batches`;
CREATE TABLE IF NOT EXISTS `job_batches` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -196,23 +162,45 @@ CREATE TABLE IF NOT EXISTS `job_batches` (
`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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `jobs`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE IF NOT EXISTS `migrations` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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;
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
-- La exportación de datos fue deseleccionada.
INSERT INTO `migrations` VALUES
(1,'0001_01_01_000000_create_users_table',1),
(2,'0001_01_01_000001_create_cache_table',1),
(3,'0001_01_01_000002_create_jobs_table',1),
(4,'2026_01_27_132900_create_personal_access_tokens_table',1),
(5,'2026_01_27_133609_create_permission_tables',1),
(6,'2026_02_15_051618_fix_unique_constraint_proceso_admision_detalles',2);
-- Volcando estructura para tabla admision_2026.model_has_permissions
DROP TABLE IF EXISTS `model_has_permissions`;
CREATE TABLE IF NOT EXISTS `model_has_permissions` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -220,12 +208,11 @@ CREATE TABLE IF NOT EXISTS `model_has_permissions` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `model_has_roles`;
CREATE TABLE IF NOT EXISTS `model_has_roles` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -233,12 +220,11 @@ CREATE TABLE IF NOT EXISTS `model_has_roles` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `pagos`;
CREATE TABLE IF NOT EXISTS `pagos` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -255,23 +241,21 @@ CREATE TABLE IF NOT EXISTS `pagos` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `password_reset_tokens`;
CREATE TABLE IF NOT EXISTS `password_reset_tokens` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `permissions`;
CREATE TABLE IF NOT EXISTS `permissions` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -279,13 +263,12 @@ CREATE TABLE IF NOT EXISTS `permissions` (
`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
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `personal_access_tokens`;
CREATE TABLE IF NOT EXISTS `personal_access_tokens` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -300,13 +283,12 @@ CREATE TABLE IF NOT EXISTS `personal_access_tokens` (
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
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `postulantes`;
CREATE TABLE IF NOT EXISTS `postulantes` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `postulantes` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`email` varchar(255) NOT NULL,
@ -320,12 +302,11 @@ CREATE TABLE IF NOT EXISTS `postulantes` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `preguntas`;
CREATE TABLE IF NOT EXISTS `preguntas` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `preguntas` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`curso_id` bigint unsigned NOT NULL,
`enunciado` longtext NOT NULL,
@ -344,19 +325,18 @@ CREATE TABLE IF NOT EXISTS `preguntas` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `preguntas_asignadas`;
CREATE TABLE IF NOT EXISTS `preguntas_asignadas` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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',
`respuesta_usuario` varchar(20) CHARACTER SET utf8mb4 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',
`estado` enum('pendiente','respondida','anulada') CHARACTER SET utf8mb4 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,
@ -368,12 +348,35 @@ CREATE TABLE IF NOT EXISTS `preguntas_asignadas` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `proceso_admision_detalles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `proceso_admision_detalles` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`proceso_admision_id` bigint unsigned NOT NULL,
`tipo` enum('requisitos','pagos','vacantes','cronograma') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`titulo_detalle` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`descripcion` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`listas` json DEFAULT NULL,
`meta` json DEFAULT NULL,
`url` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`imagen_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`imagen_path_2` varchar(500) 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 `uq_proceso_tipo` (`proceso_admision_id`,`tipo`),
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=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `procesos`;
CREATE TABLE IF NOT EXISTS `procesos` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -402,19 +405,18 @@ CREATE TABLE IF NOT EXISTS `procesos` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `procesos_admision`;
CREATE TABLE IF NOT EXISTS `procesos_admision` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
`titulo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`subtitulo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`descripcion` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
`slug` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`tipo_proceso` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`modalidad` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`publicado` tinyint(1) NOT NULL DEFAULT '0',
`fecha_publicacion` datetime DEFAULT NULL,
`fecha_inicio_preinscripcion` datetime DEFAULT NULL,
@ -426,52 +428,26 @@ CREATE TABLE IF NOT EXISTS `procesos_admision` (
`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',
`imagen_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`banner_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`brochure_path` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`link_preinscripcion` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`link_inscripcion` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`link_resultados` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`link_reglamento` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`estado` enum('nuevo','publicado','en_proceso','finalizado','cancelado') CHARACTER SET utf8mb4 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
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `reglas_area_proceso`;
CREATE TABLE IF NOT EXISTS `reglas_area_proceso` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `reglas_area_proceso` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`area_proceso_id` bigint unsigned NOT NULL,
`curso_id` bigint unsigned NOT NULL,
@ -487,12 +463,11 @@ CREATE TABLE IF NOT EXISTS `reglas_area_proceso` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `resultados_admision`;
CREATE TABLE IF NOT EXISTS `resultados_admision` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resultados_admision` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`dni` varchar(20) NOT NULL,
`paterno` varchar(100) NOT NULL,
@ -521,12 +496,11 @@ CREATE TABLE IF NOT EXISTS `resultados_admision` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `resultados_admision_carga`;
CREATE TABLE IF NOT EXISTS `resultados_admision_carga` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resultados_admision_carga` (
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
`dni` varchar(20) DEFAULT NULL,
`paterno` varchar(100) DEFAULT NULL,
@ -617,26 +591,11 @@ CREATE TABLE IF NOT EXISTS `resultados_admision_carga` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `role_has_permissions`;
CREATE TABLE IF NOT EXISTS `role_has_permissions` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `role_has_permissions` (
`permission_id` bigint unsigned NOT NULL,
`role_id` bigint unsigned NOT NULL,
PRIMARY KEY (`permission_id`,`role_id`),
@ -644,12 +603,24 @@ CREATE TABLE IF NOT EXISTS `role_has_permissions` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `sessions`;
CREATE TABLE IF NOT EXISTS `sessions` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -660,12 +631,11 @@ CREATE TABLE IF NOT EXISTS `sessions` (
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
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `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,
@ -676,12 +646,15 @@ CREATE TABLE IF NOT EXISTS `users` (
`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.
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!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 SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

@ -1,10 +1,11 @@
<!doctype html>
<html lang="en">
<html lang="es">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<link rel="icon" type="image/png" href="/logotiny.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>frontend</title>
<meta name="description" content="Direccion de Admision - Universidad Nacional del Altiplano Puno. Procesos de admision, convocatorias, requisitos e inscripciones." />
<title>Direccion de Admision - UNA Puno</title>
</head>
<body>
<div id="app"></div>

2102
front/package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -11,6 +11,8 @@
"test:run": "vitest run"
},
"dependencies": {
"@fontsource/lora": "^5.2.8",
"@fontsource/merriweather": "^5.2.11",
"@vueup/vue-quill": "^1.2.0",
"ant-design-vue": "^4.2.6",
"axios": "^1.13.3",

@ -63,7 +63,7 @@
.footer-col li,
.footer-text,
.footer-bottom {
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
}

@ -2,63 +2,88 @@
<template>
<section class="contact-section">
<div class="section-container">
<div class="contact-grid">
<div class="contact-info">
<h2 class="section-title">¿Necesitas Ayuda?</h2>
<p class="contact-subtitle">Nuestro equipo está listo para asistirte en todo el proceso de admisión</p>
<div class="contact-methods">
<div class="contact-method">
<PhoneOutlined />
<div>
<h4>Teléfono</h4>
<p>(01) 123-4567</p>
</div>
</div>
<div class="contact-method">
<MailOutlined />
<div>
<h4>Email</h4>
<p>admision@universidad.edu.pe</p>
</div>
</div>
<div class="contact-method">
<ClockCircleOutlined />
<div>
<h4>Horario</h4>
<p>Lun-Vie: 8:00 AM - 6:00 PM</p>
</div>
</div>
</div>
</div>
<div class="contact-form">
<h3>Envíanos un Mensaje</h3>
<a-form layout="vertical">
<a-form-item label="Nombre completo">
<a-input placeholder="Ingresa tu nombre completo" />
</a-form-item>
<a-form-item label="Email">
<a-input placeholder="tu@email.com" />
</a-form-item>
<a-form-item label="Consulta">
<a-textarea placeholder="Describe tu consulta..." :rows="4" />
</a-form-item>
<a-button type="primary" block>Enviar Mensaje</a-button>
</a-form>
<!-- Preguntas Frecuentes -->
<div class="faq-block">
<div class="section-header">
<h2 class="section-title">Preguntas Frecuentes</h2>
<p class="section-subtitle">Resuelve tus dudas sobre el proceso de admision</p>
</div>
<a-collapse
v-model:activeKey="activeFaqKeys"
:bordered="false"
expand-icon-position="end"
class="faq-collapse"
>
<a-collapse-panel
v-for="(faq, index) in faqs"
:key="String(index)"
class="faq-panel"
>
<template #header>
<div class="faq-header">
<span class="faq-number">{{ String(index + 1).padStart(2, '0') }}</span>
<span class="faq-question">{{ faq.pregunta }}</span>
</div>
</template>
<div class="faq-answer" v-html="faq.respuesta"></div>
</a-collapse-panel>
</a-collapse>
</div>
</div>
</section>
</template>
<script setup>
import { PhoneOutlined, MailOutlined, ClockCircleOutlined } from '@ant-design/icons-vue'
import { ref } from 'vue'
const activeFaqKeys = ref([])
const faqs = [
{
pregunta: '¿Puedo postular con DNI caducado?',
respuesta: 'No, su DNI debe estar vigente al momento de la inscripcion. En su defecto, puede presentar la Hoja C4 o el ticket de tramite acompañado de una copia del DNI.',
},
{
pregunta: '¿Que requisitos debo presentar si postulo como persona con discapacidad?',
respuesta: 'Certificado de Discapacidad emitido por entidades de salud acreditadas en el RENIPRESS. Este debe ser adjuntado junto a los demas requisitos.',
},
{
pregunta: '¿Que hago si ingreso mal mis datos en la preinscripcion?',
respuesta: 'No es posible modificarlos en linea una vez guardados. Debe acercarse al local de inscripcion y solicitar ayuda en la oficina de soporte tecnico.',
},
{
pregunta: '¿Cuales son los codigos para realizar los pagos?',
respuesta: '<p><strong>Codigo 26:</strong> Derechos de Admision.</p><p><strong>Codigo 27:</strong> Rezagados al proceso de inscripcion.</p><p><strong>Codigo 28:</strong> Carpeta de postulante.</p>',
},
{
pregunta: '¿Como debo realizar la preinscripcion e inscripcion?',
respuesta: 'Ingrese a <a href="https://admision.unap.edu.pe" target="_blank" rel="noopener noreferrer" class="faq-link">admision.unap.edu.pe</a> para la preinscripcion. La inscripcion presencial se realiza segun el ultimo digito del DNI, segun el cronograma oficial.',
},
{
pregunta: '¿Que requisitos debo presentar si postulo a Medicina Humana o Educacion Fisica?',
respuesta: 'Constancia de evaluacion medica emitida por un establecimiento de salud primario, ademas de los demas requisitos exigidos.',
},
{
pregunta: '¿Puedo cambiar de programa de estudio luego de inscribirme?',
respuesta: 'Si. Tras obtener su constancia de inscripcion, debe realizar un pago de S/.100 (Codigo 27) en caja de la Universidad o Banco de la Nacion, incluyendo comision.',
},
{
pregunta: '¿Que debo traer para inscribirme presencialmente?',
respuesta: '<ul><li>Comprobantes de pago o vouchers</li><li>DNI original y copia</li><li>Solicitud de Preinscripcion impresa (descargada de la web)</li><li>Certificado de estudios original y copia</li></ul>',
},
{
pregunta: '¿Los postulantes con discapacidad hacen cola?',
respuesta: 'No. Deben presentar su Certificado de Discapacidad y se les brindara atencion preferencial.',
},
]
</script>
<style scoped>
.contact-section {
padding: 80px 0;
padding: 60px 0 40px;
font-family: "Lora", serif;
}
.section-container {
@ -67,73 +92,139 @@ import { PhoneOutlined, MailOutlined, ClockCircleOutlined } from '@ant-design/ic
padding: 0 24px;
}
.contact-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 80px;
align-items: start;
/* ── FAQ ── */
.faq-block {
margin-bottom: 0;
}
.section-header {
text-align: center;
margin-bottom: 48px;
}
.section-title {
font-size: 2.5rem;
font-weight: 700;
color: #1a237e;
margin-bottom: 16px;
color: #0d1b52;
margin: 0 0 12px;
}
.contact-subtitle {
color: #666;
.section-subtitle {
font-size: 1.125rem;
margin-bottom: 40px;
color: #666;
max-width: 540px;
margin: 0 auto;
}
.contact-methods {
display: flex;
flex-direction: column;
gap: 24px;
.faq-collapse {
background: transparent;
}
.faq-panel {
background: #fff;
border: 1px solid #e8ecf4 !important;
border-radius: 14px !important;
margin-bottom: 14px;
overflow: hidden;
transition: box-shadow 0.25s ease;
}
.faq-panel:hover {
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.07);
}
.faq-panel :deep(.ant-collapse-header) {
padding: 20px 24px !important;
align-items: center !important;
}
.contact-method {
.faq-panel :deep(.ant-collapse-content-box) {
padding: 0 24px 22px 24px !important;
}
.faq-header {
display: flex;
align-items: center;
gap: 16px;
gap: 14px;
}
.contact-method svg {
color: #1890ff;
font-size: 24px;
.faq-number {
display: inline-flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border-radius: 10px;
background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
color: #fff;
font-size: 0.8rem;
font-weight: 700;
flex-shrink: 0;
}
.contact-method h4 {
margin: 0 0 4px;
.faq-question {
font-weight: 600;
color: #1a237e;
font-size: 1rem;
line-height: 1.4;
}
.contact-method p {
.faq-answer {
color: #555;
font-size: 0.975rem;
line-height: 1.75;
padding-left: 50px;
}
.faq-answer :deep(ul) {
padding-left: 20px;
margin: 0;
color: #666;
}
.contact-form {
background: white;
padding: 40px;
border-radius: 16px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
.faq-answer :deep(ul li) {
margin-bottom: 4px;
}
.contact-form h3 {
margin: 0 0 32px;
color: #1a237e;
.faq-answer :deep(p) {
margin: 0 0 4px;
}
.faq-answer :deep(.faq-link) {
color: #1890ff;
text-decoration: underline;
}
.faq-answer :deep(.faq-link:hover) {
color: #0d1b52;
}
@media (max-width: 992px) {
.contact-grid {
grid-template-columns: 1fr;
gap: 48px;
}
.section-title {
font-size: 2rem;
}
.faq-answer {
padding-left: 0;
}
}
@media (max-width: 768px) {
.contact-section {
padding: 40px 0 30px;
}
.faq-panel :deep(.ant-collapse-header) {
padding: 16px 18px !important;
}
.faq-number {
width: 32px;
height: 32px;
font-size: 0.75rem;
}
.faq-question {
font-size: 0.925rem;
}
}
</style>
</style>

@ -203,7 +203,7 @@ function abrirPreinscripcion(proceso) {
.convocatorias-modern {
position: relative;
padding: 40px 0;
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
background: #fbfcff;
overflow: hidden;
}

@ -120,7 +120,7 @@ defineEmits(["scroll-to-convocatoria", "virtual-tour"]);
.hero,
.hero * {
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
}
.hero {

@ -102,7 +102,7 @@ defineProps({
radial-gradient(1000px 420px at 95% 10%, #f3f0ff 0%, transparent 55%),
#fbfcff;
overflow: hidden;
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
}
.news-section::before {
@ -151,7 +151,7 @@ defineProps({
.title {
margin: 0 !important;
text-align: center;
font-family: "Times New Roman", Times, serif !important;
font-family: "Lora", serif !important;
font-weight: 900; /* fuerte para título */
color: #111a56;
letter-spacing: -0.4px;
@ -161,7 +161,7 @@ defineProps({
.subtitle {
margin: 8px 0 0 !important;
text-align: center;
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
font-weight: 300;
color: rgba(0, 0, 0, 0.58);
line-height: 1.6;
@ -170,7 +170,7 @@ defineProps({
.title :deep(.ant-typography),
.subtitle :deep(.ant-typography) {
font-family: "Times New Roman", Times, serif !important;
font-family: "Lora", serif !important;
}
.btn-all {

@ -126,7 +126,7 @@ const currentStep = computed(() => {
.process-section {
padding: 30px 0;
background: #ffffff;
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
}
.section-container {

@ -94,7 +94,7 @@ const selectArea = (area) => {
.areas-section {
padding: 80px 0;
background: #f5f5f5;
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
}
.section-container {

@ -12,7 +12,7 @@
<div class="stats-grid">
<div class="stat-card">
<div class="stat-top">
<span class="stat-number">25+</span>
<span class="stat-number">44+</span>
</div>
<p class="stat-label">Carreras Profesionales</p>
</div>
@ -47,7 +47,7 @@
.stats-section {
position: relative;
padding: 70px 0;
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
color: #fff;
background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
overflow: hidden;

@ -231,7 +231,7 @@ onUnmounted(() => {
.logo-text span,
.drawer-logo-text h3,
.drawer-logo-text span {
font-family: "Times New Roman", Times, serif;
font-family: "Lora", serif;
}
.modern-header {

@ -8,6 +8,13 @@ import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/reset.css'
import 'katex/dist/katex.min.css'
// Fuentes locales
import '@fontsource/lora/400.css'
import '@fontsource/lora/600.css'
import '@fontsource/lora/700.css'
import '@fontsource/merriweather/400.css'
import '@fontsource/merriweather/700.css'
const app = createApp(App)
const pinia = createPinia()

@ -1,376 +0,0 @@
# Instalacion - Direccion de Admision 2026
## Requisitos previos
| Herramienta | Version minima | Uso |
|---|---|---|
| Laragon | - | PHP + Composer (servidor local) |
| PHP | 8.4+ | Backend Laravel (Thread Safe, VS17 x64) |
| Composer | 2.x | Dependencias PHP |
| Node.js | 18+ | Frontend Vue |
| npm | 9+ | Dependencias JS |
| Docker | 20+ | Solo para MySQL |
| Docker Compose | 2+ | Solo para MySQL |
### Descargar PHP 8.4 para Laragon
Si Laragon no trae PHP 8.4, descargarlo manualmente:
1. Descargar desde https://windows.php.net/download/ el archivo **VS17 x64 Thread Safe** (zip)
2. Extraer en `C:\laragon\bin\php\php-8.4.xx-Win32-vs17-x64\`
3. En Laragon: clic derecho > **PHP** > seleccionar la version 8.4
4. Instalar Visual C++ 2022 si no lo tienes: https://aka.ms/vs/17/release/vc_redist.x64.exe
5. Agregar al PATH: clic derecho en Laragon > **Tools** > **Path** > **Add Laragon to Path**
---
## Paso 1: Clonar el repositorio
```bash
git clone <url-del-repo> direccion_de_admision_2026
cd direccion_de_admision_2026
```
---
## Paso 2: Levantar MySQL con Docker
```bash
docker compose up -d
```
Esto levanta un contenedor MySQL 8.0 con:
- **Host:** 127.0.0.1
- **Puerto:** 3306
- **Usuario:** root
- **Password:** root
- **Base de datos:** admision_2026
Verificar que funcione:
```bash
docker exec admision_2026_db mysql -uroot -proot -e "SELECT 'MySQL OK'"
```
---
## Paso 3: Importar la base de datos
```bash
docker exec -i admision_2026_db mysql -uroot -proot admision_2026 < admision_2026_200.sql
```
Verificar tablas importadas:
```bash
docker exec admision_2026_db mysql -uroot -proot admision_2026 -e "SHOW TABLES;"
```
Debe mostrar 32 tablas (users, postulantes, areas, cursos, examenes, procesos_admision, etc.)
---
## Paso 4: Configurar el Backend (Laravel)
```bash
cd back
```
### 4.1 Instalar dependencias
```bash
composer install
```
### 4.2 Configurar variables de entorno
```bash
copy .env.example .env
```
Editar `back/.env` y cambiar la password de la BD:
```
DB_PASSWORD=root
```
### 4.3 Generar clave de aplicacion
```bash
php artisan key:generate
```
### 4.4 Crear enlace de storage (para imagenes)
```bash
php artisan storage:link
```
### 4.5 Ejecutar migraciones y seeders
```bash
php artisan migrate
php artisan db:seed --class=RoleSeeder
```
Esto crea las tablas de permisos (Spatie) y los roles: `usuario`, `administrador`, `superadmin`.
### 4.6 Asignar rol a tu usuario
Si ya tienes un usuario creado (por registro o por el dump SQL), asignarle un rol desde tinker:
```bash
php artisan tinker
```
```php
$user = \App\Models\User::where('email', 'tu@email.com')->first();
$user->assignRole('superadmin');
exit
```
> **Importante:** Sin un rol asignado, el login devuelve 200 pero no redirige al dashboard.
---
## Paso 5: Configurar el Frontend (Vue 3)
```bash
cd front
```
### 5.1 Instalar dependencias
```bash
npm install
```
### 5.2 Configurar variables de entorno
```bash
copy .env.example .env
```
El archivo debe contener:
```
VITE_API_URL=http://127.0.0.1:8000/api
```
---
## Levantar el proyecto
Necesitas **3 cosas corriendo** al mismo tiempo:
### 1. MySQL (Docker) - si no esta corriendo
```bash
docker compose up -d
```
### 2. Backend (Terminal 1)
```bash
cd back
php artisan serve
```
Estara disponible en: **http://localhost:8000**
### 3. Frontend (Terminal 2)
```bash
cd front
npm run dev
```
Estara disponible en: **http://localhost:5173**
---
## Stack tecnologico
| Capa | Tecnologia |
|---|---|
| Backend | Laravel 12 + PHP 8.4 |
| Frontend | Vue 3 + Vite 7 + Ant Design Vue + Pinia |
| Base de datos | MySQL 8.0 (Docker) |
| Autenticacion | Laravel Sanctum (Bearer tokens) |
| Permisos | Spatie Laravel Permission |
| QR | SimpleSoftwareIO QRCode |
---
## Notas importantes
- **No modificar** `composer.lock` a menos que todos los del equipo acuerden (requiere PHP 8.4+)
- El dump SQL (`admision_2026_200.sql`) ya incluye todas las tablas y datos necesarios, no se necesita `php artisan migrate`
- Si el puerto 3306 esta ocupado (por otro MySQL local), detener ese servicio primero o cambiar el puerto en `docker-compose.yml`
- Los archivos `.env` no se suben al repositorio (estan en `.gitignore`)
---
# Deploy en Produccion (Docker)
Todo el proyecto se dockeriza para correr en un VPS con Linux. Se usan 4 contenedores: **nginx** (reverse proxy), **backend** (PHP-FPM), **frontend** (Vue SPA + nginx) y **mysql**.
## Requisitos del servidor
| Herramienta | Version minima |
|---|---|
| Docker | 20+ |
| Docker Compose | 2+ |
| RAM | 2 GB minimo |
| Disco | 10 GB minimo |
---
## Paso 1: Clonar el repositorio en el servidor
```bash
git clone <url-del-repo> direccion_de_admision_2026
cd direccion_de_admision_2026
```
---
## Paso 2: Configurar variables de entorno
```bash
cp .env.prod.example .env.prod
```
Editar `.env.prod` y configurar **obligatoriamente**:
```
APP_KEY= # Generar con: php artisan key:generate --show (o tras el build)
APP_URL=https://tu-dominio.com
DB_PASSWORD=UNA_PASSWORD_SEGURA
SESSION_DOMAIN=tu-dominio.com
SANCTUM_STATEFUL_DOMAINS=tu-dominio.com
VITE_API_URL=/api
```
Configurar tambien el correo SMTP si se usa envio de emails.
---
## Paso 3: Importar la base de datos (primera vez)
Construir y levantar solo MySQL primero:
```bash
docker compose -f docker-compose.prod.yml up -d mysql
```
Esperar a que MySQL este listo y luego importar el dump:
```bash
docker exec -i admision_prod_db mysql -uroot -pTU_PASSWORD admision_2026 < admision_2026_200.sql
```
Verificar:
```bash
docker exec admision_prod_db mysql -uroot -pTU_PASSWORD admision_2026 -e "SHOW TABLES;"
```
---
## Paso 4: Construir y levantar todos los servicios
```bash
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d
```
Verificar que los 4 contenedores esten corriendo:
```bash
docker compose -f docker-compose.prod.yml ps
```
---
## Paso 5: Generar APP_KEY (primera vez)
```bash
docker exec admision_prod_backend php artisan key:generate --show
```
Copiar la clave generada al archivo `.env.prod` en `APP_KEY=` y reiniciar:
```bash
docker compose -f docker-compose.prod.yml restart backend
```
---
## Paso 6: Crear enlace de storage
```bash
docker exec admision_prod_backend php artisan storage:link
```
---
## Verificar el deploy
- Abrir `http://tu-dominio.com` -> debe cargar el frontend Vue
- Abrir `http://tu-dominio.com/api/...` -> debe responder la API Laravel
---
## Comandos utiles
```bash
# Ver logs de todos los servicios
docker compose -f docker-compose.prod.yml logs -f
# Ver logs de un servicio especifico
docker compose -f docker-compose.prod.yml logs -f backend
# Reiniciar todo
docker compose -f docker-compose.prod.yml restart
# Detener todo
docker compose -f docker-compose.prod.yml down
# Reconstruir tras cambios de codigo
git pull
docker compose -f docker-compose.prod.yml build
docker compose -f docker-compose.prod.yml up -d
# Ejecutar comandos artisan
docker exec admision_prod_backend php artisan migrate --force
docker exec admision_prod_backend php artisan cache:clear
```
---
## Arquitectura de contenedores
```
Puerto 80
|
[nginx] (reverse proxy)
/ \
/api/* / \ /*
/ \
[backend] [frontend]
PHP-FPM nginx+SPA
:9000 :80
|
[mysql]
:3306
```
---
## Notas de produccion
- Los datos de MySQL se persisten en un volumen Docker (`mysql_data`)
- El storage de Laravel se persiste en un volumen Docker (`backend_storage`)
- Para HTTPS, configurar un reverse proxy externo (Nginx/Caddy en el host) o usar Cloudflare
- El archivo `.env.prod` **nunca** debe subirse al repositorio
Loading…
Cancel
Save