-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 24-09-2026 a las 18:30:45
-- Versión del servidor: 10.4.32-MariaDB
-- Versión de PHP: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `colegio_santa_maria`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `banners`
--

CREATE TABLE `banners` (
  `id_banner` int(10) UNSIGNED NOT NULL,
  `titulo` varchar(120) DEFAULT NULL,
  `imagen` varchar(255) NOT NULL,
  `enlace` varchar(255) DEFAULT NULL,
  `orden` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `activo` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `categorias_noticias`
--

CREATE TABLE `categorias_noticias` (
  `id_categoria` smallint(5) UNSIGNED NOT NULL,
  `nombre` varchar(50) NOT NULL,
  `slug` varchar(60) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `categorias_noticias`
--

INSERT INTO `categorias_noticias` (`id_categoria`, `nombre`, `slug`) VALUES
(1, 'Institucional', 'institucional'),
(2, 'Academico', 'academico'),
(3, 'Pastoral', 'pastoral'),
(4, 'Deportes', 'deportes'),
(5, 'Fiestas congregacion', 'fiestas-congregacion');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `comunicados`
--

CREATE TABLE `comunicados` (
  `id_comunicado` int(10) UNSIGNED NOT NULL,
  `titulo` varchar(200) NOT NULL,
  `contenido` text DEFAULT NULL,
  `archivo` varchar(255) DEFAULT NULL,
  `fecha` date NOT NULL,
  `publicado` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `configuracion`
--

CREATE TABLE `configuracion` (
  `clave` varchar(50) NOT NULL,
  `valor` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `configuracion`
--

INSERT INTO `configuracion` (`clave`, `valor`) VALUES
('direccion', 'Tumbes, Peru'),
('email_contacto', ''),
('lema', 'Todo por Jesus y en espiritu de reparacion'),
('mision', ''),
('nombre_colegio', 'Institucion Educativa Particular Santa Maria de la Frontera'),
('telefono', ''),
('vision', '');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `documentos`
--

CREATE TABLE `documentos` (
  `id_documento` int(10) UNSIGNED NOT NULL,
  `titulo` varchar(150) NOT NULL,
  `categoria` varchar(50) DEFAULT NULL,
  `archivo` varchar(255) NOT NULL,
  `publicado` tinyint(1) NOT NULL DEFAULT 1,
  `subido_en` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `enlaces`
--

CREATE TABLE `enlaces` (
  `id_enlace` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(80) NOT NULL,
  `url` varchar(255) NOT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `tipo` enum('institucional','interes','red_social') NOT NULL DEFAULT 'institucional',
  `orden` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `activo` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `enlaces`
--

INSERT INTO `enlaces` (`id_enlace`, `nombre`, `url`, `logo`, `tipo`, `orden`, `activo`) VALUES
(1, 'Ministerio de Educacion', 'https://www.gob.pe/minedu', NULL, 'institucional', 1, 1),
(2, 'PerúEduca', 'https://www.perueduca.pe', NULL, 'institucional', 2, 1),
(3, 'Pronabec', 'https://www.gob.pe/pronabec', NULL, 'institucional', 3, 1),
(4, 'SiseVe', 'https://www.siseve.pe', NULL, 'institucional', 4, 1),
(5, 'Siagie', 'https://siagie.minedu.gob.pe', NULL, 'institucional', 5, 1),
(6, 'Senaju', 'https://www.gob.pe/senaju', NULL, 'institucional', 6, 1),
(7, 'Facebook', 'https://www.facebook.com/', NULL, 'red_social', 1, 1),
(8, 'YouTube', 'https://www.youtube.com/results?search_query=+SANTA+MARIA+FRONTERA+', 'DSAD', 'red_social', 1, 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `exalumnos`
--

CREATE TABLE `exalumnos` (
  `id_exalumno` int(10) UNSIGNED NOT NULL,
  `nombres` varchar(80) NOT NULL,
  `apellidos` varchar(80) NOT NULL,
  `promocion` year(4) NOT NULL,
  `profesion` varchar(100) DEFAULT NULL,
  `email` varchar(120) DEFAULT NULL,
  `telefono` varchar(15) DEFAULT NULL,
  `testimonio` text DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `aprobado` tinyint(1) NOT NULL DEFAULT 0,
  `registrado_en` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `galerias`
--

CREATE TABLE `galerias` (
  `id_galeria` int(10) UNSIGNED NOT NULL,
  `titulo` varchar(120) NOT NULL,
  `descripcion` varchar(255) DEFAULT NULL,
  `portada` varchar(255) DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `publicado` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `galerias`
--

INSERT INTO `galerias` (`id_galeria`, `titulo`, `descripcion`, `portada`, `fecha`, `publicado`) VALUES
(1, 'Ingreso', NULL, NULL, NULL, 1),
(2, 'Pastoral', NULL, NULL, NULL, 1),
(3, 'Fiestas congregacion', NULL, NULL, NULL, 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `galeria_items`
--

CREATE TABLE `galeria_items` (
  `id_item` int(10) UNSIGNED NOT NULL,
  `id_galeria` int(10) UNSIGNED NOT NULL,
  `tipo` enum('imagen','video') NOT NULL DEFAULT 'imagen',
  `ruta` varchar(255) NOT NULL,
  `descripcion` varchar(150) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `mensajes_contacto`
--

CREATE TABLE `mensajes_contacto` (
  `id_mensaje` int(10) UNSIGNED NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `email` varchar(120) NOT NULL,
  `telefono` varchar(15) DEFAULT NULL,
  `asunto` varchar(150) DEFAULT NULL,
  `mensaje` text NOT NULL,
  `leido` tinyint(1) NOT NULL DEFAULT 0,
  `enviado_en` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `menus`
--

CREATE TABLE `menus` (
  `id_menu` int(10) UNSIGNED NOT NULL,
  `id_padre` int(10) UNSIGNED DEFAULT NULL,
  `titulo` varchar(60) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `icono` varchar(255) DEFAULT NULL,
  `orden` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `visible` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `menus`
--

INSERT INTO `menus` (`id_menu`, `id_padre`, `titulo`, `slug`, `icono`, `orden`, `visible`) VALUES
(1, NULL, 'Inicio', 'inicio', NULL, 1, 1),
(2, NULL, 'Institucional', 'institucional', NULL, 2, 1),
(3, NULL, 'Academico', 'academico', NULL, 3, 1),
(4, NULL, 'Niveles formativos', 'niveles-formativos', NULL, 4, 1),
(5, NULL, 'Noticias y actualidad', 'noticias', NULL, 5, 1),
(6, NULL, 'Servicios', 'servicios', NULL, 6, 1),
(7, NULL, 'Ex alumnos', 'ex-alumnos', NULL, 7, 1),
(8, NULL, 'Contacto', 'contacto', NULL, 8, 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2026_09_24_000000_create_school_schema', 1);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `niveles`
--

CREATE TABLE `niveles` (
  `id_nivel` tinyint(3) UNSIGNED NOT NULL,
  `nombre` varchar(40) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `imagen` varchar(255) DEFAULT NULL,
  `orden` tinyint(3) UNSIGNED NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `niveles`
--

INSERT INTO `niveles` (`id_nivel`, `nombre`, `descripcion`, `imagen`, `orden`) VALUES
(1, 'Inicial', NULL, NULL, 1),
(2, 'Primaria', NULL, NULL, 2),
(3, 'Secundaria', NULL, NULL, 3);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `noticias`
--

CREATE TABLE `noticias` (
  `id_noticia` int(10) UNSIGNED NOT NULL,
  `id_categoria` smallint(5) UNSIGNED DEFAULT NULL,
  `id_usuario` int(10) UNSIGNED DEFAULT NULL,
  `titulo` varchar(200) NOT NULL,
  `slug` varchar(220) NOT NULL,
  `resumen` varchar(400) DEFAULT NULL,
  `contenido` mediumtext NOT NULL,
  `imagen` varchar(255) DEFAULT NULL,
  `destacada` tinyint(1) NOT NULL DEFAULT 0,
  `publicado` tinyint(1) NOT NULL DEFAULT 0,
  `fecha_publicacion` datetime DEFAULT NULL,
  `creado_en` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `paginas`
--

CREATE TABLE `paginas` (
  `id_pagina` int(10) UNSIGNED NOT NULL,
  `id_menu` int(10) UNSIGNED DEFAULT NULL,
  `titulo` varchar(150) NOT NULL,
  `slug` varchar(160) NOT NULL,
  `contenido` mediumtext DEFAULT NULL,
  `imagen` varchar(255) DEFAULT NULL,
  `publicado` tinyint(1) NOT NULL DEFAULT 1,
  `actualizado_en` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `personal`
--

CREATE TABLE `personal` (
  `id_personal` int(10) UNSIGNED NOT NULL,
  `nombres` varchar(80) NOT NULL,
  `apellidos` varchar(80) NOT NULL,
  `cargo` varchar(80) DEFAULT NULL,
  `area` enum('directivo','docente','administrativo','apoyo') NOT NULL DEFAULT 'docente',
  `id_nivel` tinyint(3) UNSIGNED DEFAULT NULL,
  `especialidad` varchar(80) DEFAULT NULL,
  `email` varchar(120) DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `orden` smallint(5) UNSIGNED NOT NULL DEFAULT 0,
  `activo` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `reclamaciones`
--

CREATE TABLE `reclamaciones` (
  `id_reclamo` int(10) UNSIGNED NOT NULL,
  `codigo` varchar(20) NOT NULL,
  `nombres` varchar(120) NOT NULL,
  `documento_tipo` enum('DNI','CE','Pasaporte') NOT NULL DEFAULT 'DNI',
  `documento_num` varchar(15) NOT NULL,
  `direccion` varchar(150) DEFAULT NULL,
  `telefono` varchar(15) DEFAULT NULL,
  `email` varchar(120) NOT NULL,
  `es_menor` tinyint(1) NOT NULL DEFAULT 0,
  `apoderado` varchar(120) DEFAULT NULL,
  `tipo` enum('reclamo','queja') NOT NULL,
  `detalle` text NOT NULL,
  `pedido` text DEFAULT NULL,
  `estado` enum('recibido','en_proceso','atendido') NOT NULL DEFAULT 'recibido',
  `respuesta` text DEFAULT NULL,
  `fecha_registro` timestamp NOT NULL DEFAULT current_timestamp(),
  `fecha_respuesta` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `solicitudes_ingreso`
--

CREATE TABLE `solicitudes_ingreso` (
  `id_solicitud` int(10) UNSIGNED NOT NULL,
  `nombres_alumno` varchar(80) NOT NULL,
  `apellidos_alumno` varchar(80) NOT NULL,
  `fecha_nacimiento` date DEFAULT NULL,
  `id_nivel` tinyint(3) UNSIGNED DEFAULT NULL,
  `grado` varchar(30) DEFAULT NULL,
  `apoderado` varchar(120) NOT NULL,
  `telefono` varchar(15) NOT NULL,
  `email` varchar(120) DEFAULT NULL,
  `comentario` text DEFAULT NULL,
  `estado` enum('pendiente','contactado','aceptado','rechazado') NOT NULL DEFAULT 'pendiente',
  `enviado_en` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `usuarios`
--

CREATE TABLE `usuarios` (
  `id_usuario` int(10) UNSIGNED NOT NULL,
  `nombres` varchar(80) NOT NULL,
  `email` varchar(120) NOT NULL,
  `password` varchar(255) NOT NULL,
  `rol` enum('administrador','editor') NOT NULL DEFAULT 'editor',
  `estado` enum('activo','inactivo') NOT NULL DEFAULT 'activo',
  `ultimo_acceso` datetime DEFAULT NULL,
  `creado_en` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Volcado de datos para la tabla `usuarios`
--

INSERT INTO `usuarios` (`id_usuario`, `nombres`, `email`, `password`, `rol`, `estado`, `ultimo_acceso`, `creado_en`) VALUES
(1, 'Administrador', 'admin@santamariatumbes.edu.pe', '$2y$10$jDCz1413axWKmDZ.GZgpfu0J7rsxeA7JNl8pfDLce.LtvzseqkhG.', 'administrador', 'activo', '2026-09-24 16:07:52', '2026-09-24 13:24:15');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `banners`
--
ALTER TABLE `banners`
  ADD PRIMARY KEY (`id_banner`);

--
-- Indices de la tabla `categorias_noticias`
--
ALTER TABLE `categorias_noticias`
  ADD PRIMARY KEY (`id_categoria`),
  ADD UNIQUE KEY `categorias_noticias_nombre_unique` (`nombre`),
  ADD UNIQUE KEY `categorias_noticias_slug_unique` (`slug`);

--
-- Indices de la tabla `comunicados`
--
ALTER TABLE `comunicados`
  ADD PRIMARY KEY (`id_comunicado`);

--
-- Indices de la tabla `configuracion`
--
ALTER TABLE `configuracion`
  ADD PRIMARY KEY (`clave`);

--
-- Indices de la tabla `documentos`
--
ALTER TABLE `documentos`
  ADD PRIMARY KEY (`id_documento`);

--
-- Indices de la tabla `enlaces`
--
ALTER TABLE `enlaces`
  ADD PRIMARY KEY (`id_enlace`);

--
-- Indices de la tabla `exalumnos`
--
ALTER TABLE `exalumnos`
  ADD PRIMARY KEY (`id_exalumno`);

--
-- Indices de la tabla `galerias`
--
ALTER TABLE `galerias`
  ADD PRIMARY KEY (`id_galeria`);

--
-- Indices de la tabla `galeria_items`
--
ALTER TABLE `galeria_items`
  ADD PRIMARY KEY (`id_item`),
  ADD KEY `galeria_items_id_galeria_foreign` (`id_galeria`);

--
-- Indices de la tabla `mensajes_contacto`
--
ALTER TABLE `mensajes_contacto`
  ADD PRIMARY KEY (`id_mensaje`);

--
-- Indices de la tabla `menus`
--
ALTER TABLE `menus`
  ADD PRIMARY KEY (`id_menu`),
  ADD UNIQUE KEY `menus_slug_unique` (`slug`),
  ADD KEY `menus_id_padre_foreign` (`id_padre`);

--
-- Indices de la tabla `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `niveles`
--
ALTER TABLE `niveles`
  ADD PRIMARY KEY (`id_nivel`),
  ADD UNIQUE KEY `niveles_nombre_unique` (`nombre`);

--
-- Indices de la tabla `noticias`
--
ALTER TABLE `noticias`
  ADD PRIMARY KEY (`id_noticia`),
  ADD UNIQUE KEY `noticias_slug_unique` (`slug`),
  ADD KEY `noticias_id_categoria_foreign` (`id_categoria`),
  ADD KEY `noticias_id_usuario_foreign` (`id_usuario`);

--
-- Indices de la tabla `paginas`
--
ALTER TABLE `paginas`
  ADD PRIMARY KEY (`id_pagina`),
  ADD UNIQUE KEY `paginas_slug_unique` (`slug`),
  ADD KEY `paginas_id_menu_foreign` (`id_menu`);

--
-- Indices de la tabla `personal`
--
ALTER TABLE `personal`
  ADD PRIMARY KEY (`id_personal`),
  ADD KEY `personal_id_nivel_foreign` (`id_nivel`);

--
-- Indices de la tabla `reclamaciones`
--
ALTER TABLE `reclamaciones`
  ADD PRIMARY KEY (`id_reclamo`),
  ADD UNIQUE KEY `reclamaciones_codigo_unique` (`codigo`);

--
-- Indices de la tabla `solicitudes_ingreso`
--
ALTER TABLE `solicitudes_ingreso`
  ADD PRIMARY KEY (`id_solicitud`),
  ADD KEY `solicitudes_ingreso_id_nivel_foreign` (`id_nivel`);

--
-- Indices de la tabla `usuarios`
--
ALTER TABLE `usuarios`
  ADD PRIMARY KEY (`id_usuario`),
  ADD UNIQUE KEY `usuarios_email_unique` (`email`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `banners`
--
ALTER TABLE `banners`
  MODIFY `id_banner` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `categorias_noticias`
--
ALTER TABLE `categorias_noticias`
  MODIFY `id_categoria` smallint(5) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT de la tabla `comunicados`
--
ALTER TABLE `comunicados`
  MODIFY `id_comunicado` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `documentos`
--
ALTER TABLE `documentos`
  MODIFY `id_documento` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `enlaces`
--
ALTER TABLE `enlaces`
  MODIFY `id_enlace` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de la tabla `exalumnos`
--
ALTER TABLE `exalumnos`
  MODIFY `id_exalumno` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `galerias`
--
ALTER TABLE `galerias`
  MODIFY `id_galeria` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `galeria_items`
--
ALTER TABLE `galeria_items`
  MODIFY `id_item` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `mensajes_contacto`
--
ALTER TABLE `mensajes_contacto`
  MODIFY `id_mensaje` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `menus`
--
ALTER TABLE `menus`
  MODIFY `id_menu` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de la tabla `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `niveles`
--
ALTER TABLE `niveles`
  MODIFY `id_nivel` tinyint(3) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `noticias`
--
ALTER TABLE `noticias`
  MODIFY `id_noticia` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT de la tabla `paginas`
--
ALTER TABLE `paginas`
  MODIFY `id_pagina` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `personal`
--
ALTER TABLE `personal`
  MODIFY `id_personal` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `reclamaciones`
--
ALTER TABLE `reclamaciones`
  MODIFY `id_reclamo` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `solicitudes_ingreso`
--
ALTER TABLE `solicitudes_ingreso`
  MODIFY `id_solicitud` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `usuarios`
--
ALTER TABLE `usuarios`
  MODIFY `id_usuario` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `galeria_items`
--
ALTER TABLE `galeria_items`
  ADD CONSTRAINT `galeria_items_id_galeria_foreign` FOREIGN KEY (`id_galeria`) REFERENCES `galerias` (`id_galeria`) ON DELETE CASCADE;

--
-- Filtros para la tabla `menus`
--
ALTER TABLE `menus`
  ADD CONSTRAINT `menus_id_padre_foreign` FOREIGN KEY (`id_padre`) REFERENCES `menus` (`id_menu`) ON DELETE CASCADE;

--
-- Filtros para la tabla `noticias`
--
ALTER TABLE `noticias`
  ADD CONSTRAINT `noticias_id_categoria_foreign` FOREIGN KEY (`id_categoria`) REFERENCES `categorias_noticias` (`id_categoria`) ON DELETE SET NULL,
  ADD CONSTRAINT `noticias_id_usuario_foreign` FOREIGN KEY (`id_usuario`) REFERENCES `usuarios` (`id_usuario`) ON DELETE SET NULL;

--
-- Filtros para la tabla `paginas`
--
ALTER TABLE `paginas`
  ADD CONSTRAINT `paginas_id_menu_foreign` FOREIGN KEY (`id_menu`) REFERENCES `menus` (`id_menu`) ON DELETE SET NULL;

--
-- Filtros para la tabla `personal`
--
ALTER TABLE `personal`
  ADD CONSTRAINT `personal_id_nivel_foreign` FOREIGN KEY (`id_nivel`) REFERENCES `niveles` (`id_nivel`) ON DELETE SET NULL;

--
-- Filtros para la tabla `solicitudes_ingreso`
--
ALTER TABLE `solicitudes_ingreso`
  ADD CONSTRAINT `solicitudes_ingreso_id_nivel_foreign` FOREIGN KEY (`id_nivel`) REFERENCES `niveles` (`id_nivel`) ON DELETE SET NULL;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
