text: -- phpMyAdmin SQL Dump
  -- version 4.6.6deb5ubuntu0.5
  -- https://www.phpmyadmin.net/
  --
  -- Servidor: localhost:3306
  -- Tiempo de generación: 22-09-2021 a las 11:29:09
  -- Versión del servidor: 5.7.35-0ubuntu0.18.04.2
  -- Versión de PHP: 7.2.24-0ubuntu0.18.04.9
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET time_zone = "+00:00";
  SET FOREIGN_KEY_CHECKS=0;
  
  /*!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: `pruebatecnica`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `comments`
  --
  
  CREATE TABLE `comments` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `user_id` int(11) DEFAULT NULL,
    `parent_id` bigint(20) UNSIGNED NOT NULL,
    `comment` text 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 `comments`
  --
  
  
  -- --------------------------------------------------------
  
  --
  -- Estructura de tabla para la tabla `posts`
  --
  
  CREATE TABLE `posts` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `text` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `views` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `comments` varchar(255) 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;
  
  --
  -- Volcado de datos para la tabla `posts`
  --
  
  -- --------------------------------------------------------
  
  --
  -- 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;
  
  --
  -- Volcado de datos para la tabla `users`
  --
  
  --
  -- Índices para tablas volcadas
  --
  
  --
  -- Indices de la tabla `comments`
  --
  ALTER TABLE `comments`
    ADD PRIMARY KEY (`id`),
    ADD KEY `comments_parent_id_foreign` (`parent_id`);
  
  --
  -- Indices de la tabla `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    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 `personal_access_tokens`
  --
  ALTER TABLE `personal_access_tokens`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
    ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);
  
  --
  -- Indices de la tabla `posts`
  --
  ALTER TABLE `posts`
    ADD PRIMARY KEY (`id`);
  
  --
  -- 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 `comments`
  --
  ALTER TABLE `comments`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
  --
  -- 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 `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  --
  -- AUTO_INCREMENT de la tabla `personal_access_tokens`
  --
  ALTER TABLE `personal_access_tokens`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT de la tabla `posts`
  --
  ALTER TABLE `posts`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
  --
  -- AUTO_INCREMENT de la tabla `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  --
  -- Restricciones para tablas volcadas
  --
  
  --
  -- Filtros para la tabla `comments`
  --
  ALTER TABLE `comments`
    ADD CONSTRAINT `comments_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `posts` (`id`) ON CASCADE;
  
  /*!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 */;
  