-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 11-04-2026 a las 02:50:48
-- Versión del servidor: 10.4.32-MariaDB
-- Versión de PHP: 8.2.12

START TRANSACTION;



--
-- Base de datos: `ficha_db`
--

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

--
-- Estructura de tabla para la tabla `academic_records`
--

CREATE TABLE `academic_records` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `first_names` varchar(255) NOT NULL,
  `last_names` varchar(255) NOT NULL,
  `dni` varchar(255) NOT NULL,
  `cohort` varchar(255) NOT NULL,
  `specialty` varchar(255) NOT NULL,
  `birth_date` date NOT NULL,
  `registration_date` date NOT NULL,
  `book` varchar(255) NOT NULL,
  `folio` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  `custom_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`custom_values`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `academic_records` (`id`, `first_names`, `last_names`, `dni`, `cohort`, `specialty`, `birth_date`, `registration_date`, `book`, `folio`, `location`, `custom_values`, `created_at`, `updated_at`) VALUES
(1, 'JUAN PABLO', 'PEREZ RODRIGUEZ', '12345678', '2024-I', 'INGENIERÍA DE SISTEMAS', '1995-05-15', '2024-12-10', 'L-001', 'F-45', 'ARCHIVERO CENTRAL PASILLO B', '{\"Direccion\":\"Av san martin\",\"Telefono\":\"04123996988\"}', '2026-04-10 08:53:29', '2026-04-10 18:57:43'),
(2, 'JOSE DAVID', 'HIDALGO OLIVERO', '17148064', '2014-II', 'Informatica', '1986-01-27', '2014-06-20', 'L-002', 'F-46', 'Secretaria piso 1 estante 23', '{\"Direccion\":\"San Martin Parque Residencial san juan\",\"Telefono\":\"04123996988\"}', '2026-04-10 20:42:50', '2026-04-10 20:43:11');

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

--
-- Estructura de tabla para la tabla `custom_fields`
--

CREATE TABLE `custom_fields` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `label` varchar(255) NOT NULL,
  `section` enum('personal','academic','additional') NOT NULL DEFAULT 'additional',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `custom_fields` (`id`, `label`, `section`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 'Telefono', 'additional', 1, '2026-04-10 18:29:25', '2026-04-10 18:29:25'),
(2, 'Direccion', 'personal', 1, '2026-04-10 18:56:31', '2026-04-10 18:56:31');

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

--
-- 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, '2024_01_01_000001_create_users_table', 1),
(2, '2024_01_01_000002_create_academic_records_table', 1),
(3, '2024_01_01_000003_create_custom_fields_table', 2),
(4, '2024_01_01_000004_add_custom_values_to_academic_records', 2),
(5, '2024_01_01_000005_add_section_to_custom_fields', 3);

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `academic_records`
--
ALTER TABLE `academic_records`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `academic_records_dni_unique` (`dni`);

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

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

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `academic_records`
--
ALTER TABLE `academic_records`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `custom_fields`
--
ALTER TABLE `custom_fields`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

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

