/*
 Navicat Premium Data Transfer

 Source Server         : LOCAL
 Source Server Type    : MySQL
 Source Server Version : 100136
 Source Host           : localhost:3306
 Source Schema         : api2

 Target Server Type    : MySQL
 Target Server Version : 100136
 File Encoding         : 65001

 Date: 14/08/2020 23:57:12
*/


-- ----------------------------
-- Table structure for categories
-- ----------------------------
CREATE TABLE `categories`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `deleted_at` timestamp(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of categories
-- ----------------------------
INSERT INTO `categories` VALUES (1, 'prueba', NULL);

-- ----------------------------
-- Table structure for failed_jobs
-- ----------------------------
CREATE TABLE `failed_jobs`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `connection` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for migrations
-- ----------------------------
CREATE TABLE `migrations`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of migrations
-- ----------------------------
INSERT INTO `migrations` VALUES (1, '2014_10_12_000000_create_users_table', 1);
INSERT INTO `migrations` VALUES (2, '2019_08_19_000000_create_failed_jobs_table', 1);
INSERT INTO `migrations` VALUES (3, '2020_07_22_174718_create_categories_table', 1);
INSERT INTO `migrations` VALUES (4, '2016_06_01_000001_create_oauth_auth_codes_table', 2);
INSERT INTO `migrations` VALUES (5, '2016_06_01_000002_create_oauth_access_tokens_table', 2);
INSERT INTO `migrations` VALUES (6, '2016_06_01_000003_create_oauth_refresh_tokens_table', 2);
INSERT INTO `migrations` VALUES (7, '2016_06_01_000004_create_oauth_clients_table', 2);
INSERT INTO `migrations` VALUES (8, '2016_06_01_000005_create_oauth_personal_access_clients_table', 2);
INSERT INTO `migrations` VALUES (9, '2020_07_23_022213_create_pruebas_table', 3);
INSERT INTO `migrations` VALUES (10, '2020_07_23_024035_create_pruebas_table', 4);
INSERT INTO `migrations` VALUES (11, '2020_07_23_031402_create_pruebas_table', 5);
INSERT INTO `migrations` VALUES (12, '2020_07_24_024054_create_prueba2s_table', 6);

-- ----------------------------
-- Table structure for oauth_auth_codes
-- ----------------------------
CREATE TABLE `oauth_auth_codes`  (
  `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `client_id` bigint(20) UNSIGNED NOT NULL,
  `scopes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL,
  `revoked` tinyint(1) NOT NULL,
  `expires_at` datetime(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `oauth_auth_codes_user_id_index`(`user_id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Table structure for oauth_personal_access_clients
-- ----------------------------
CREATE TABLE `oauth_personal_access_clients`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `client_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp(0) NULL DEFAULT NULL,
  `updated_at` timestamp(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of oauth_personal_access_clients
-- ----------------------------
INSERT INTO `oauth_personal_access_clients` VALUES (1, 1, '2020-07-23 00:10:35', '2020-07-23 00:10:35');
INSERT INTO `oauth_personal_access_clients` VALUES (2, 3, '2020-07-23 00:15:21', '2020-07-23 00:15:21');

-- ----------------------------
-- Table structure for permissions
-- ----------------------------
CREATE TABLE `permissions`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of permissions
-- ----------------------------
INSERT INTO `permissions` VALUES (1, 'view_users');
INSERT INTO `permissions` VALUES (2, 'edit_users');
INSERT INTO `permissions` VALUES (3, 'view_roles');
INSERT INTO `permissions` VALUES (4, 'edit_roles');
INSERT INTO `permissions` VALUES (5, 'view_products');
INSERT INTO `permissions` VALUES (6, 'edit_products');
INSERT INTO `permissions` VALUES (7, 'view_orders');
INSERT INTO `permissions` VALUES (8, 'edit_orders');
INSERT INTO `permissions` VALUES (9, 'prueba');
INSERT INTO `permissions` VALUES (10, 'prueba');

-- ----------------------------
-- Table structure for prueba2s
-- ----------------------------
CREATE TABLE `prueba2s`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `deleted_at` timestamp(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of prueba2s
-- ----------------------------
INSERT INTO `prueba2s` VALUES (1, 'p', NULL);
INSERT INTO `prueba2s` VALUES (2, 'prueba', NULL);
INSERT INTO `prueba2s` VALUES (3, 'uno', NULL);
INSERT INTO `prueba2s` VALUES (4, 'p', NULL);
INSERT INTO `prueba2s` VALUES (5, 'p', NULL);
INSERT INTO `prueba2s` VALUES (6, 'p', NULL);
INSERT INTO `prueba2s` VALUES (7, 'p', NULL);
INSERT INTO `prueba2s` VALUES (8, 'p', NULL);
INSERT INTO `prueba2s` VALUES (9, 'p', NULL);
INSERT INTO `prueba2s` VALUES (10, 'p', NULL);
INSERT INTO `prueba2s` VALUES (11, 'p', NULL);
INSERT INTO `prueba2s` VALUES (12, 'p', NULL);
INSERT INTO `prueba2s` VALUES (13, 'p', NULL);
INSERT INTO `prueba2s` VALUES (14, 'p', NULL);
INSERT INTO `prueba2s` VALUES (15, 'p', NULL);
INSERT INTO `prueba2s` VALUES (16, 'p', NULL);
INSERT INTO `prueba2s` VALUES (17, 'p', NULL);
INSERT INTO `prueba2s` VALUES (18, 'pp', NULL);
INSERT INTO `prueba2s` VALUES (19, 'p', NULL);
INSERT INTO `prueba2s` VALUES (20, 'p', NULL);
INSERT INTO `prueba2s` VALUES (21, 'p', NULL);
INSERT INTO `prueba2s` VALUES (22, 'p', NULL);
INSERT INTO `prueba2s` VALUES (23, 'p', NULL);
INSERT INTO `prueba2s` VALUES (24, 'p', NULL);
INSERT INTO `prueba2s` VALUES (25, 'p', NULL);
INSERT INTO `prueba2s` VALUES (26, 'p', NULL);
INSERT INTO `prueba2s` VALUES (27, 'p', NULL);
INSERT INTO `prueba2s` VALUES (28, 'p', NULL);
INSERT INTO `prueba2s` VALUES (29, 'p', NULL);
INSERT INTO `prueba2s` VALUES (30, 'p', NULL);
INSERT INTO `prueba2s` VALUES (31, 'p', NULL);
INSERT INTO `prueba2s` VALUES (32, 'p', NULL);
INSERT INTO `prueba2s` VALUES (33, 'p', NULL);
INSERT INTO `prueba2s` VALUES (34, 'p', NULL);
INSERT INTO `prueba2s` VALUES (35, 'p', NULL);
INSERT INTO `prueba2s` VALUES (36, 'p', NULL);

-- ----------------------------
-- Table structure for pruebas
-- ----------------------------
CREATE TABLE `pruebas`  (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `deleted_at` timestamp(0) NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of pruebas
-- ----------------------------
INSERT INTO `pruebas` VALUES (1, 'prueba', NULL);

-- ----------------------------
-- Table structure for role_permission
-- ----------------------------
CREATE TABLE `role_permission`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `role_permission_role_id_foreign`(`role_id`) USING BTREE,
  INDEX `role_permission_permission_id_foreign`(`permission_id`) USING BTREE,
  CONSTRAINT `role_permission_ibfk_1` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `role_permission_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 53 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of role_permission
-- ----------------------------
INSERT INTO `role_permission` VALUES (16, 3, 1);
INSERT INTO `role_permission` VALUES (17, 3, 3);
INSERT INTO `role_permission` VALUES (18, 3, 5);
INSERT INTO `role_permission` VALUES (19, 3, 7);
INSERT INTO `role_permission` VALUES (20, 5, 1);
INSERT INTO `role_permission` VALUES (21, 5, 2);
INSERT INTO `role_permission` VALUES (22, 5, 3);
INSERT INTO `role_permission` VALUES (28, 6, 1);
INSERT INTO `role_permission` VALUES (29, 6, 4);
INSERT INTO `role_permission` VALUES (30, 6, 7);
INSERT INTO `role_permission` VALUES (39, 1, 1);
INSERT INTO `role_permission` VALUES (40, 1, 2);
INSERT INTO `role_permission` VALUES (41, 1, 3);
INSERT INTO `role_permission` VALUES (42, 1, 4);
INSERT INTO `role_permission` VALUES (43, 1, 5);
INSERT INTO `role_permission` VALUES (44, 1, 6);
INSERT INTO `role_permission` VALUES (45, 1, 7);
INSERT INTO `role_permission` VALUES (46, 1, 8);
INSERT INTO `role_permission` VALUES (47, 2, 1);
INSERT INTO `role_permission` VALUES (48, 2, 2);
INSERT INTO `role_permission` VALUES (49, 2, 5);
INSERT INTO `role_permission` VALUES (50, 2, 6);
INSERT INTO `role_permission` VALUES (51, 2, 7);
INSERT INTO `role_permission` VALUES (52, 2, 8);

-- ----------------------------
-- Table structure for roles
-- ----------------------------
CREATE TABLE `roles`  (
  `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Compact;

-- ----------------------------
-- Records of roles
-- ----------------------------
INSERT INTO `roles` VALUES (1, 'Admin');
INSERT INTO `roles` VALUES (2, 'Editor');
INSERT INTO `roles` VALUES (3, 'Viewer');
INSERT INTO `roles` VALUES (5, 'prueba6');
INSERT INTO `roles` VALUES (6, 'prueba8');

