text: -- phpMyAdmin SQL Dump
  -- version 5.1.0
  -- https://www.phpmyadmin.net/
  --
  -- Servidor: 127.0.0.1
  -- Tiempo de generación: 22-06-2021 a las 18:29:19
  -- Versión del servidor: 10.4.18-MariaDB
  -- Versión de PHP: 8.0.3
  
  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: `histories`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `clients`
  --
  
  CREATE TABLE `clients` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `last_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `cellphone` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `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 `clients`
  --
  
  INSERT INTO `clients` (`id`, `name`, `last_name`, `email`, `cellphone`, `created_at`, `updated_at`) VALUES
  (1, 'luis', 'Chicaiza', 'luiscont@fsd', '0959743877', NULL, '2021-06-21 09:00:11'),
  (3, 'Armando', 'Chicaiza', 'luiscont1502@gmail.com', '0959743877', '2021-06-21 17:42:03', '2021-06-21 17:42:03');
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `client_history`
  --
  
  CREATE TABLE `client_history` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `client_id` bigint(20) UNSIGNED NOT NULL,
    `history_id` bigint(20) UNSIGNED NOT NULL,
    `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 `client_history`
  --
  
  INSERT INTO `client_history` (`id`, `client_id`, `history_id`, `created_at`, `updated_at`) VALUES
  (1, 1, 1, NULL, NULL),
  (3, 3, 3, NULL, NULL);
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `failed_jobs`
  --
  
  CREATE TABLE `failed_jobs` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
    `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `histories`
  --
  
  CREATE TABLE `histories` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `oxygen` decimal(5,2) NOT NULL,
    `temperature` decimal(5,2) NOT NULL,
    `frecuency` int(11) NOT NULL,
    `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 `histories`
  --
  
  INSERT INTO `histories` (`id`, `oxygen`, `temperature`, `frecuency`, `created_at`, `updated_at`) VALUES
  (1, '25.25', '35.80', 95, NULL, NULL),
  (2, '15.00', '15.12', 95, '2021-06-21 08:40:07', '2021-06-21 08:40:07'),
  (3, '15.00', '15.12', 95, '2021-06-21 17:42:03', '2021-06-21 17:42:03');
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(255) COLLATE utf8mb4_unicode_ci 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, '2014_10_12_000000_create_users_table', 1),
  (2, '2014_10_12_100000_create_password_resets_table', 1),
  (3, '2019_08_19_000000_create_failed_jobs_table', 1),
  (4, '2021_06_21_032203_create_clients_table', 1),
  (5, '2021_06_21_032226_create_histories_table', 1),
  (6, '2021_06_21_032350_create_client_history_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `users`
  --
  
  CREATE TABLE `users` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Índices para tablas volcadas
  --
  
  --
  -- Indices de la tabla `clients`
  --
  ALTER TABLE `clients`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `client_history`
  --
  ALTER TABLE `client_history`
    ADD PRIMARY KEY (`id`),
    ADD KEY `client_history_client_id_foreign` (`client_id`),
    ADD KEY `client_history_history_id_foreign` (`history_id`);
  
  --
  -- Indices de la tabla `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);
  
  --
  -- Indices de la tabla `histories`
  --
  ALTER TABLE `histories`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indices de la tabla `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indices de la tabla `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- AUTO_INCREMENT de las tablas volcadas
  --
  
  --
  -- AUTO_INCREMENT de la tabla `clients`
  --
  ALTER TABLE `clients`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT de la tabla `client_history`
  --
  ALTER TABLE `client_history`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT de la tabla `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT de la tabla `histories`
  --
  ALTER TABLE `histories`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT de la tabla `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT de la tabla `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- Restricciones para tablas volcadas
  --
  
  --
  -- Filtros para la tabla `client_history`
  --
  ALTER TABLE `client_history`
    ADD CONSTRAINT `client_history_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
    ADD CONSTRAINT `client_history_history_id_foreign` FOREIGN KEY (`history_id`) REFERENCES `histories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  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 */;
  