--
-- Host: localhost    Database: mangoo13
-- ------------------------------------------------------


--
-- Current Database: `mangoo13`
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mangoo13` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;

USE `mangoo13`;

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `version` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `class` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `group` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `namespace` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `time` int NOT NULL,
  `batch` int unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` VALUES (1,'2026-07-05-000001','App\\Database\\Migrations\\CreateUsersTable','default','App',1783715010,1),(2,'2026-07-06-000001','App\\Database\\Migrations\\CreateTasksTable','default','App',1783715010,1);

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(190) COLLATE utf8mb4_general_ci NOT NULL,
  `description` text COLLATE utf8mb4_general_ci,
  `status` enum('pending','in_progress','completed','cancelled') COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending',
  `creator_user_id` bigint unsigned NOT NULL,
  `owner_user_id` bigint unsigned NOT NULL,
  `responsible_user_id` bigint unsigned NOT NULL,
  `due_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `status` (`status`),
  KEY `creator_user_id` (`creator_user_id`),
  KEY `owner_user_id` (`owner_user_id`),
  KEY `responsible_user_id` (`responsible_user_id`),
  CONSTRAINT `tasks_creator_user_id_foreign` FOREIGN KEY (`creator_user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `tasks_owner_user_id_foreign` FOREIGN KEY (`owner_user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE,
  CONSTRAINT `tasks_responsible_user_id_foreign` FOREIGN KEY (`responsible_user_id`) REFERENCES `users` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tasks`
--

INSERT INTO `tasks` VALUES (1,'Nombre de tarea','Prueba de creación de tarea','pending',1,1,1,'2026-07-17 19:00:00','2026-07-10 21:06:18','2026-07-10 21:06:18'),(2,'demo','demo124','pending',1,1,1,'2026-07-17 19:00:00','2026-07-10 22:23:54','2026-07-10 22:23:54');

--
-- Dumping routines for database 'mangoo13'
--


