/*
 Navicat Premium Data Transfer

 Source Server         : laragon
 Source Server Type    : MySQL
 Source Server Version : 80030 (8.0.30)
 Source Host           : localhost:3306
 Source Schema         : gestordoc

 Target Server Type    : MySQL
 Target Server Version : 80030 (8.0.30)
 File Encoding         : 65001

 Date: 22/07/2024 20:08:57
*/


-- ----------------------------
-- Table structure for carpetas
-- ----------------------------
CREATE TABLE `carpetas`  (
  `carpeta_id` int NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `carpetapadre_id` int NULL DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`carpeta_id`) USING BTREE,
  INDEX `carpetas_user_id_foreign`(`user_id` ASC) USING BTREE,
  INDEX `carpetas_carpetapadre_id_foreign`(`carpetapadre_id` ASC) USING BTREE,
  CONSTRAINT `carpetas_carpetapadre_id_foreign` FOREIGN KEY (`carpetapadre_id`) REFERENCES `carpetas` (`carpeta_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `carpetas_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of carpetas
-- ----------------------------
INSERT INTO `carpetas` VALUES (16, 'Pruebas', 3, NULL, '2024-06-19 17:45:29', '2024-06-19 17:45:29');
INSERT INTO `carpetas` VALUES (22, 'Comunicados', 3, NULL, '2024-06-21 12:05:40', '2024-06-21 12:05:40');
INSERT INTO `carpetas` VALUES (23, 'Prueba', 3, NULL, '2024-06-21 12:06:10', '2024-06-21 12:06:10');
INSERT INTO `carpetas` VALUES (24, 'Pruebas.01', 1, NULL, '2024-06-21 20:25:05', '2024-06-21 20:25:05');
INSERT INTO `carpetas` VALUES (25, 'Comunicados', 1, NULL, '2024-06-21 20:28:47', '2024-06-21 20:28:47');
INSERT INTO `carpetas` VALUES (26, 'Información de Gestión 01', 1, NULL, '2024-06-21 20:29:05', '2024-06-24 19:37:40');

-- ----------------------------
-- Table structure for archivos
-- ----------------------------
CREATE TABLE `archivos`  (
  `archivo_id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `tipo` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `tamano` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `carpeta_id` int NOT NULL,
  `user_id` int UNSIGNED NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`archivo_id`) USING BTREE,
  INDEX `archivos_carpeta_id_foreign`(`carpeta_id` ASC) USING BTREE,
  INDEX `archivos_user_id_foreign`(`user_id` ASC) USING BTREE,
  CONSTRAINT `archivos_carpeta_id_foreign` FOREIGN KEY (`carpeta_id`) REFERENCES `carpetas` (`carpeta_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `archivos_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 66 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of archivos
-- ----------------------------
INSERT INTO `archivos` VALUES (49, 'Downloads.zip', 'application/x-zip-compressed', '216084', 22, 3, '2024-06-21 12:05:52', '2024-06-21 12:05:52');
INSERT INTO `archivos` VALUES (50, 'Downloads.zip', 'application/x-zip-compressed', '216084', 23, 3, '2024-06-21 12:06:24', '2024-06-21 12:06:24');
INSERT INTO `archivos` VALUES (51, 'Screenshot_15.png', 'image/png', '35787', 16, 3, '2024-06-21 12:07:06', '2024-06-21 12:07:06');
INSERT INTO `archivos` VALUES (54, 'Comunicado Junio.docx', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', '11379', 25, 1, '2024-06-21 20:43:41', '2024-06-21 20:43:41');
INSERT INTO `archivos` VALUES (55, 'DOCUMENTOS PPP DESARROLLO SOFT.zip', 'application/x-zip-compressed', '3266094', 26, 1, '2024-06-24 19:37:07', '2024-06-24 19:37:07');
INSERT INTO `archivos` VALUES (56, 'Screenshot_10.png', 'image/png', '517', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (57, 'Screenshot_9.png', 'image/png', '890', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (58, 'Screenshot_8.png', 'image/png', '1220', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (59, 'Screenshot_7.png', 'image/png', '1026', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (60, 'Screenshot_6.png', 'image/png', '569', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (61, 'Screenshot_5.png', 'image/png', '806', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (62, 'Screenshot_4.png', 'image/png', '993', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (63, 'Screenshot_3.png', 'image/png', '512', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (64, 'Screenshot_2.png', 'image/png', '60890', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');
INSERT INTO `archivos` VALUES (65, 'Screenshot_1.png', 'image/png', '1171', 25, 1, '2024-06-25 12:18:52', '2024-06-25 12:18:52');

-- ----------------------------
-- Table structure for archcompartidas
-- ----------------------------
CREATE TABLE `archcompartidas`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int UNSIGNED NOT NULL,
  `archivo_id` int UNSIGNED NOT NULL,
  `usershare_id` int UNSIGNED NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `archcompartidas_user_id_foreign`(`user_id` ASC) USING BTREE,
  INDEX `archcompartidas_archivo_id_foreign`(`archivo_id` ASC) USING BTREE,
  INDEX `archcompartidas_usershare_id_foreign`(`usershare_id` ASC) USING BTREE,
  CONSTRAINT `archcompartidas_archivo_id_foreign` FOREIGN KEY (`archivo_id`) REFERENCES `archivos` (`archivo_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `archcompartidas_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `archcompartidas_usershare_id_foreign` FOREIGN KEY (`usershare_id`) REFERENCES `usuarios` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of archcompartidas
-- ----------------------------
INSERT INTO `archcompartidas` VALUES (13, 4, 57, 1, '2024-06-25 12:28:28', '2024-06-25 12:28:28');


-- ----------------------------
-- Table structure for carpcompartidas
-- ----------------------------
CREATE TABLE `carpcompartidas`  (
  `id` int UNSIGNED NOT NULL AUTO_INCREMENT,
  `user_id` int UNSIGNED NOT NULL,
  `carpeta_id` int NOT NULL,
  `usershare_id` int UNSIGNED NOT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `carpcompartidas_user_id_foreign`(`user_id` ASC) USING BTREE,
  INDEX `carpcompartidas_carpeta_id_foreign`(`carpeta_id` ASC) USING BTREE,
  INDEX `carpcompartidas_usershare_id_foreign`(`usershare_id` ASC) USING BTREE,
  CONSTRAINT `carpcompartidas_carpeta_id_foreign` FOREIGN KEY (`carpeta_id`) REFERENCES `carpetas` (`carpeta_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `carpcompartidas_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `carpcompartidas_usershare_id_foreign` FOREIGN KEY (`usershare_id`) REFERENCES `usuarios` (`user_id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of carpcompartidas
-- ----------------------------
INSERT INTO `carpcompartidas` VALUES (8, 1, 16, 3, '2024-06-19 17:45:37', '2024-06-19 17:45:37');
INSERT INTO `carpcompartidas` VALUES (10, 4, 25, 1, '2024-06-25 12:18:12', '2024-06-25 12:18:12');


-- ----------------------------
-- Table structure for migrations
-- ----------------------------
CREATE TABLE `migrations`  (
  `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT,
  `version` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `class` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `group` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `namespace` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `time` int NOT NULL,
  `batch` int UNSIGNED NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES (1, '2024-06-09-232451', 'App\\Database\\Migrations\\Usuarios', 'default', 'App', 1717978000, 1);
INSERT INTO `migrations` VALUES (2, '2024-06-09-232621', 'App\\Database\\Migrations\\Carpetas', 'default', 'App', 1717978000, 1);
INSERT INTO `migrations` VALUES (3, '2024-06-09-233058', 'App\\Database\\Migrations\\Archivos', 'default', 'App', 1717978000, 1);
INSERT INTO `migrations` VALUES (4, '2024-06-09-233159', 'App\\Database\\Migrations\\CarpetasCompartidas', 'default', 'App', 1717978000, 1);
INSERT INTO `migrations` VALUES (5, '2024-06-09-233232', 'App\\Database\\Migrations\\ArchivosCompartidos', 'default', 'App', 1717978000, 1);



