芝麻web文件管理V1.00
编辑当前文件:/home/digitalh/panorama.panoramawholesale.com/database/schema/martvill-schema.sql
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET TIME_ZONE='+00:00' */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; DROP TABLE IF EXISTS `activity_logs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `activity_logs` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `log_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `subject_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `subject_id` bigint unsigned DEFAULT NULL, `event` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `causer_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `causer_id` bigint unsigned DEFAULT NULL, `properties` json DEFAULT NULL, `batch_uuid` char(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `subject` (`subject_type`,`subject_id`), KEY `causer` (`causer_type`,`causer_id`), KEY `activity_logs_log_name_index` (`log_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `addresses`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `addresses` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint NOT NULL, `first_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `last_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `company_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `type_of_place` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'home' COMMENT 'home/office', `address_1` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `address_2` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `city` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `state` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `zip` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `country` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `is_default` mediumint NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `address_user_id_foreign_idx` (`user_id`), KEY `addresses_first_name_index` (`first_name`), KEY `addresses_last_name_index` (`last_name`), KEY `addresses_city_index` (`city`), KEY `addresses_state_index` (`state`), KEY `addresses_zip_index` (`zip`), KEY `addresses_country_index` (`country`), CONSTRAINT `addresses_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `admin_menus`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `admin_menus` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `url` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `permission` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `is_default` int NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `attribute_groups`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `attribute_groups` ( `id` int NOT NULL AUTO_INCREMENT, `vendor_id` bigint DEFAULT NULL, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `summary` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `attribute_groups_name_unique` (`name`), KEY `attribute_groups_vendor_id_foreign_idx` (`vendor_id`), KEY `attribute_groups_status_index` (`status`), CONSTRAINT `attribute_groups_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `attribute_values`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `attribute_values` ( `id` bigint NOT NULL AUTO_INCREMENT, `attribute_id` bigint NOT NULL, `value` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `order_by` int NOT NULL, `status` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `attribute_values_composit_unique` (`attribute_id`,`value`), KEY `attribute_values_attribute_id_foreign_idx` (`attribute_id`), KEY `attribute_values_value_index` (`value`), KEY `attribute_values_status_index` (`status`), CONSTRAINT `attribute_values_attribute_id_foreign` FOREIGN KEY (`attribute_id`) REFERENCES `attributes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `attributes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `attributes` ( `id` bigint NOT NULL AUTO_INCREMENT, `attribute_group_id` int DEFAULT NULL, `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `is_filterable` tinyint(1) NOT NULL DEFAULT '0', `is_required` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `attributes_name_index` (`name`), KEY `attributes_type_index` (`type`), KEY `attributes_status_index` (`status`), KEY `attributes_attribute_group_id_foreign` (`attribute_group_id`), CONSTRAINT `attributes_attribute_group_id_foreign` FOREIGN KEY (`attribute_group_id`) REFERENCES `attribute_groups` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `backups`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `backups` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `backups_name_index` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `blog_categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `blog_categories` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `blog_category_AFDEL` AFTER DELETE ON `blog_categories` FOR EACH ROW UPDATE blogs SET category_id = "1" WHERE category_id = OLD.id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `blogs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `blogs` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `category_id` bigint unsigned DEFAULT NULL, `user_id` bigint DEFAULT NULL, `title` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `summary` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `total_views` int NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `blogs_user_id_foreign` (`user_id`), CONSTRAINT `blogs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `brand_stats`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `brand_stats` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `brand_id` bigint unsigned NOT NULL, `count_views` int NOT NULL DEFAULT '0', `count_sales` int NOT NULL DEFAULT '0', `date` date NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `brand_stats_brand_id_date_unique` (`brand_id`,`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `brands`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `brands` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `vendor_id` bigint DEFAULT NULL, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `brands_name_unique` (`name`), KEY `brands_vendor_id_foreign_idx` (`vendor_id`), KEY `brands_status_index` (`status`), CONSTRAINT `brands_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `canned_links`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `canned_links` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `title` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `link` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_by` int unsigned NOT NULL, `created_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `canned_links_title_index` (`title`), KEY `canned_links_link_index` (`link`), KEY `canned_links_created_by_foreign_idx` (`created_by`), KEY `canned_links_created_type_index` (`created_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `canned_messages`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `canned_messages` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `title` varchar(190) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_by` int unsigned NOT NULL, `created_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `canned_messages_title_index` (`title`), KEY `canned_messages_created_by_foreign_idx` (`created_by`), KEY `canned_messages_created_type_index` (`created_type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `categories` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `parent_id` int DEFAULT NULL, `order_by` int unsigned NOT NULL, `is_searchable` tinyint(1) NOT NULL DEFAULT '0', `is_featured` tinyint(1) NOT NULL DEFAULT '0', `product_counts` int unsigned DEFAULT '0', `sell_commissions` decimal(16,8) DEFAULT NULL, `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `categories_name_index` (`name`), KEY `categories_slug_index` (`slug`), KEY `categories_parent_id_foreign_idx` (`parent_id`), KEY `categories_order_by_index` (`order_by`), KEY `categories_is_searchable_index` (`is_searchable`), KEY `categories_is_featured_index` (`is_featured`), KEY `categories_sell_commissions_index` (`sell_commissions`), KEY `categories_status_index` (`status`), CONSTRAINT `categories_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `category_attributes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `category_attributes` ( `category_id` int NOT NULL, `attribute_id` bigint NOT NULL, KEY `category_attributes_category_id_foreign_idx` (`category_id`), KEY `category_attributes_attribute_id_foreign_idx` (`attribute_id`), CONSTRAINT `category_attributes_attribute_id_foreign` FOREIGN KEY (`attribute_id`) REFERENCES `attributes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `category_attributes_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `category_stats`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `category_stats` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `category_id` bigint unsigned NOT NULL, `count_views` int NOT NULL DEFAULT '0', `count_sales` int NOT NULL DEFAULT '0', `date` date NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `category_stats_category_id_date_unique` (`category_id`,`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `commissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `commissions` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `is_active` tinyint(1) NOT NULL DEFAULT '0', `is_category_based` tinyint(1) NOT NULL DEFAULT '0', `amount` double(16,8) NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `component_properties`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `component_properties` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `component_id` bigint unsigned NOT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `value` varchar(15000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `component_properties_name_component_id_unique` (`name`,`component_id`), KEY `component_properties_component_id_foreign_idx` (`component_id`), CONSTRAINT `component_properties_component_id_foreign` FOREIGN KEY (`component_id`) REFERENCES `components` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `components`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `components` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `page_id` bigint unsigned NOT NULL, `layout_id` bigint unsigned NOT NULL, `level` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `components_page_id_foreign_idx` (`page_id`), CONSTRAINT `components_page_id_foreign` FOREIGN KEY (`page_id`) REFERENCES `pages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `countries`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `countries` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `code` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), KEY `countries_name_index` (`name`), KEY `countries_code_index` (`code`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `coupon_redeems`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `coupon_redeems` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `coupon_id` bigint unsigned DEFAULT NULL, `coupon_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_id` bigint DEFAULT NULL, `user_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `order_id` bigint unsigned DEFAULT NULL, `order_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `discount_amount` decimal(16,8) NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `coupon_redeems_coupon_id_index` (`coupon_id`), KEY `coupon_redeems_user_id_index` (`user_id`), KEY `coupon_redeems_order_id_index` (`order_id`), KEY `coupon_redeems_discount_amount_index` (`discount_amount`), CONSTRAINT `coupon_redeems_coupon_id_foreign` FOREIGN KEY (`coupon_id`) REFERENCES `coupons` (`id`) ON DELETE SET NULL ON UPDATE SET NULL, CONSTRAINT `coupon_redeems_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE SET NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `coupon_redeems_AINS` AFTER INSERT ON `coupon_redeems` FOR EACH ROW UPDATE coupons SET usage_count = (select count(coupon_id) from coupon_redeems WHERE coupon_id = coupons.id) WHERE coupons.id = NEW.coupon_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `coupon_redeems_ADEL` AFTER DELETE ON `coupon_redeems` FOR EACH ROW UPDATE coupons SET usage_count = (select count(coupon_id) from coupon_redeems WHERE coupon_id = coupons.id) WHERE coupons.id = OLD.coupon_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `coupons`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `coupons` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `vendor_id` bigint DEFAULT NULL, `shop_id` bigint DEFAULT NULL, `usage_limit` int DEFAULT NULL, `minimum_spend` decimal(16,8) DEFAULT NULL, `usage_count` int DEFAULT NULL, `code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `discount_type` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `discount_amount` decimal(16,8) NOT NULL, `maximum_discount_amount` decimal(16,8) DEFAULT NULL, `start_date` date NOT NULL, `end_date` date NOT NULL, `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Inactive', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `coupons_name_index` (`name`), KEY `coupons_vendor_id_index` (`vendor_id`), KEY `coupons_shop_id_index` (`shop_id`), KEY `coupons_usage_limit_index` (`usage_limit`), KEY `coupons_code_index` (`code`), KEY `coupons_discount_type_index` (`discount_type`), KEY `coupons_discount_amount_index` (`discount_amount`), KEY `coupons_start_date_index` (`start_date`), KEY `coupons_end_date_index` (`end_date`), KEY `coupons_status_index` (`status`), CONSTRAINT `coupons_shop_id_foreign` FOREIGN KEY (`shop_id`) REFERENCES `shops` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `coupons_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `coupons_meta`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `coupons_meta` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `coupon_id` bigint unsigned NOT NULL, `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'null', `key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `coupons_meta_key_coupon_id_unique` (`key`,`coupon_id`), KEY `coupons_meta_coupon_id_foreign_idx` (`coupon_id`), KEY `coupons_meta_key_index` (`key`), CONSTRAINT `coupons_meta_coupon_id_foreign` FOREIGN KEY (`coupon_id`) REFERENCES `coupons` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `currencies`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `currencies` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `symbol` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `exchange_rate` decimal(16,8) DEFAULT NULL, `exchange_from` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `currencies_name_index` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `departments`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `departments` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), KEY `departments_name_index` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `email_configurations`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `email_configurations` ( `id` int NOT NULL AUTO_INCREMENT, `protocol` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `encryption` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `smtp_host` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `smtp_port` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `smtp_email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `smtp_username` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `smtp_password` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `from_address` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `from_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '1= verified, 0= unverified', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `email_templates`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `email_templates` ( `id` int NOT NULL AUTO_INCREMENT, `parent_id` int DEFAULT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `slug` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `subject` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `body` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `language_id` int NOT NULL, `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `variables` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `email_templates_name_index` (`name`), KEY `email_templates_slug_index` (`slug`), KEY `email_templates_subject_index` (`subject`), KEY `email_templates_language_id_idx` (`language_id`), CONSTRAINT `email_templates_language_id_foreign` FOREIGN KEY (`language_id`) REFERENCES `languages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `failed_jobs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `failed_jobs` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `uuid` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `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 NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `favourites`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `favourites` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `product_id` bigint unsigned NOT NULL, `user_id` bigint NOT NULL, `ip_address` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `browser_agent` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `favourites_product_id_foreign_idx` (`product_id`), KEY `favourites_user_id_foreign_idx` (`user_id`), KEY `favourites_ip_address_index` (`ip_address`), KEY `favourites_browser_agent_index` (`browser_agent`), CONSTRAINT `favourites_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `favourites_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `files`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `files` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `params` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `object_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `object_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `uploaded_by` int DEFAULT NULL, `file_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `file_size` double(8,2) DEFAULT NULL, `original_file_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `flash_sales`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `flash_sales` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `campaign name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `product_id` bigint unsigned NOT NULL, `start_date_time` datetime(5) NOT NULL, `end_date_time` datetime(5) NOT NULL, `price` decimal(16,8) NOT NULL, `quantity` decimal(16,8) NOT NULL, `vendor_id` bigint DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `flash_sales_campaign name_index` (`campaign name`), KEY `flash_sales_product_id_foreign_idx` (`product_id`), KEY `flash_sales_start_date_time_index` (`start_date_time`), KEY `flash_sales_end_date_time_index` (`end_date_time`), KEY `flash_sales_price_index` (`price`), KEY `flash_sales_quantity_index` (`quantity`), KEY `flash_sales_vendor_id_foreign_idx` (`vendor_id`), CONSTRAINT `flash_sales_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `flash_sales_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `form_submissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `form_submissions` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `form_id` int unsigned NOT NULL, `user_id` bigint DEFAULT NULL, `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `form_submissions_form_id_foreign` (`form_id`), KEY `form_submissions_user_id_foreign` (`user_id`), CONSTRAINT `form_submissions_form_id_foreign` FOREIGN KEY (`form_id`) REFERENCES `forms` (`id`) ON DELETE CASCADE, CONSTRAINT `form_submissions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `forms`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `forms` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint DEFAULT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `visibility` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `allows_edit` tinyint(1) NOT NULL DEFAULT '0', `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `identifier` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `form_builder_json` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `custom_submit_url` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `forms_identifier_unique` (`identifier`), KEY `forms_user_id_foreign` (`user_id`), CONSTRAINT `forms_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `gateways`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `gateways` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `sandbox` tinyint(1) NOT NULL COMMENT '1 - Sandbox & 0 - Production', `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `instruction` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `image` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `gateways_alias_unique` (`alias`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_cities`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_cities` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto increase ID', `country_id` bigint unsigned NOT NULL COMMENT 'Country ID', `division_id` bigint unsigned DEFAULT NULL COMMENT 'Division ID', `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'City Name', `full_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'City Fullname', `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'City Code', `iana_timezone` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'IANA Timezone Name', PRIMARY KEY (`id`), KEY `uniq_city` (`country_id`,`division_id`,`name`), KEY `division_id` (`division_id`), CONSTRAINT `geolocale_cities_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `geolocale_countries` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT, CONSTRAINT `geolocale_cities_ibfk_2` FOREIGN KEY (`division_id`) REFERENCES `geolocale_divisions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_cities_locale`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_cities_locale` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto increase ID', `city_id` bigint unsigned NOT NULL COMMENT 'City ID', `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Localized city name', `alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized city alias', `full_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized city fullname', `locale` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'locale name', PRIMARY KEY (`id`), UNIQUE KEY `uniq_city_id_locale` (`city_id`,`locale`), CONSTRAINT `geolocale_cities_locale_ibfk_1` FOREIGN KEY (`city_id`) REFERENCES `geolocale_cities` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_continents`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_continents` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto increase ID', `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Continent Name', `code` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Continent Code', PRIMARY KEY (`id`), KEY `uniq_continent` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_continents_locale`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_continents_locale` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto increase ID', `continent_id` bigint unsigned NOT NULL COMMENT 'Continent ID', `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Name', `alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Alias', `abbr` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Abbr name', `full_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Fullname', `locale` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Locale', PRIMARY KEY (`id`), UNIQUE KEY `uniq_continent_id_locale` (`continent_id`,`locale`), CONSTRAINT `geolocale_continents_locale_ibfk_1` FOREIGN KEY (`continent_id`) REFERENCES `geolocale_continents` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_countries`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_countries` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto increase ID', `continent_id` bigint unsigned NOT NULL COMMENT 'Continent ID', `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Country Common Name', `full_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Country Fullname', `capital` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Capital Common Name', `code` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'ISO3166-1-Alpha-2', `code_alpha3` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'ISO3166-1-Alpha-3', `code_numeric` smallint DEFAULT NULL COMMENT 'ISO3166-1-Numeric', `emoji` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Country Emoji', `has_division` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Has Division', `currency_code` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'iso_4217_code', `currency_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'iso_4217_name', `currency_symbol` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `tld` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Top level domain', `callingcode` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Calling prefix', PRIMARY KEY (`id`), UNIQUE KEY `uniq_country` (`continent_id`,`name`), CONSTRAINT `geolocale_countries_ibfk_1` FOREIGN KEY (`continent_id`) REFERENCES `geolocale_continents` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_countries_locale`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_countries_locale` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto increase ID', `country_id` bigint unsigned NOT NULL COMMENT 'Country ID', `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Localized Country Name', `alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Country Alias', `abbr` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Country Abbr Name', `full_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Country Fullname', `currency_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Country Currency Name', `locale` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'locale', PRIMARY KEY (`id`), UNIQUE KEY `uniq_country_id_locale` (`country_id`,`locale`), CONSTRAINT `geolocale_countries_locale_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `geolocale_countries` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_divisions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_divisions` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto Increase ID', `country_id` bigint unsigned NOT NULL COMMENT 'Country ID', `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Division Common Name', `full_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Division Full Name', `code` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'ISO 3166-2 Code', `has_city` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Has city?', PRIMARY KEY (`id`), UNIQUE KEY `uniq_division` (`country_id`,`name`), CONSTRAINT `geolocale_divisions_ibfk_1` FOREIGN KEY (`country_id`) REFERENCES `geolocale_countries` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_divisions_locale`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_divisions_locale` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto Increase ID', `division_id` bigint unsigned NOT NULL COMMENT 'Division ID', `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'Localized Division Name', `abbr` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Division Abbr', `alias` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Division Alias', `full_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Localized Division Fullname', `locale` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'locale', PRIMARY KEY (`id`), UNIQUE KEY `uniq_division_id_locale` (`division_id`,`locale`), CONSTRAINT `geolocale_divisions_locale_ibfk_1` FOREIGN KEY (`division_id`) REFERENCES `geolocale_divisions` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `geolocale_languages`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `geolocale_languages` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `iso_language_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `native_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `iso2` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `iso3` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `languages`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `languages` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `short_name` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `flag` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active' COMMENT '''Active'', ''Inactive', `is_default` tinyint(1) NOT NULL, `direction` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'ltr' COMMENT '(''ltr'', ''rtl'') ltr = left-to-right directionrtl = right-to-left direction', PRIMARY KEY (`id`), KEY `languages_name_index` (`name`), KEY `languages_short_name_index` (`short_name`), KEY `languages_status_index` (`status`), KEY `languages_is_default_index` (`is_default`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `layout_types`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `layout_types` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `layouts`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `layouts` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `layout_type_id` bigint unsigned NOT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `file` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `image` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `locations`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `locations` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `delivery_address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(18) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `fax` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `contact` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `is_active` tinyint(1) NOT NULL DEFAULT '0', `is_default` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `locations_code_unique` (`code`), KEY `locations_name_index` (`name`), KEY `locations_email_index` (`email`), KEY `locations_phone_index` (`phone`), KEY `locations_is_active_index` (`is_active`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `menu_items`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `menu_items` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `label` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `link` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `params` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `is_default` int NOT NULL DEFAULT '0', `icon` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `parent` bigint unsigned NOT NULL DEFAULT '0', `sort` int NOT NULL DEFAULT '0', `class` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `menu` bigint unsigned NOT NULL, `depth` int NOT NULL DEFAULT '0', `is_custom_menu` int NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `menu_items_menu_foreign` (`menu`), CONSTRAINT `menu_items_menu_foreign` FOREIGN KEY (`menu`) REFERENCES `menus` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `menus`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `menus` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `metas`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `metas` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `owner_type` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `owner_id` int NOT NULL, `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'null', `key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `metas_key_owner_type_owner_id_unique` (`key`,`owner_type`,`owner_id`), KEY `metas_key_index` (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `migrations`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `migrations` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `migration` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `oauth_access_tokens`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `oauth_access_tokens` ( `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` bigint unsigned DEFAULT NULL, `client_id` bigint unsigned NOT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `scopes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `revoked` tinyint(1) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `expires_at` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `oauth_access_tokens_user_id_index` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `oauth_auth_codes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `oauth_auth_codes` ( `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` bigint unsigned NOT NULL, `client_id` bigint unsigned NOT NULL, `scopes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `revoked` tinyint(1) NOT NULL, `expires_at` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `oauth_auth_codes_user_id_index` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `oauth_clients`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `oauth_clients` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint unsigned DEFAULT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `secret` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `provider` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `redirect` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `personal_access_client` tinyint(1) NOT NULL, `password_client` tinyint(1) NOT NULL, `revoked` tinyint(1) NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `oauth_clients_user_id_index` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `oauth_personal_access_clients`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `oauth_personal_access_clients` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `client_id` bigint unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `oauth_refresh_tokens`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `oauth_refresh_tokens` ( `id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `access_token_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `revoked` tinyint(1) NOT NULL, `expires_at` datetime DEFAULT NULL, PRIMARY KEY (`id`), KEY `oauth_refresh_tokens_access_token_id_index` (`access_token_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `object_files`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `object_files` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `object_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `object_id` int NOT NULL, `file_id` bigint unsigned NOT NULL, PRIMARY KEY (`id`), KEY `object_files_file_id_foreign` (`file_id`), CONSTRAINT `object_files_file_id_foreign` FOREIGN KEY (`file_id`) REFERENCES `files` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `order_commissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `order_commissions` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `order_details_id` bigint unsigned NOT NULL, `vendor_id` bigint DEFAULT NULL, `category_id` int DEFAULT NULL, `amount` decimal(16,8) DEFAULT NULL, `approval_time` datetime(5) DEFAULT NULL, `status` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `order_commissions_order_detail_id_foreign_idx` (`order_details_id`), KEY `order_commissions_vendor_id_foreign_idx` (`vendor_id`), KEY `order_commissions_category_id_foreign_idx` (`category_id`), KEY `order_commissions_approval_time_index` (`approval_time`), KEY `order_commissions_status_index` (`status`), CONSTRAINT `order_commissions_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_commissions_order_detail_id_foreign` FOREIGN KEY (`order_details_id`) REFERENCES `order_details` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_commissions_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `order_details`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `order_details` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `product_id` bigint unsigned NOT NULL, `parent_id` bigint unsigned DEFAULT NULL, `order_id` bigint unsigned NOT NULL, `vendor_id` bigint DEFAULT NULL, `shop_id` bigint DEFAULT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `product_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `price` decimal(16,8) NOT NULL, `quantity_sent` decimal(16,8) NOT NULL, `quantity` decimal(16,8) NOT NULL, `discount_amount` decimal(16,8) unsigned DEFAULT NULL, `discount_type` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `shipping_charge` decimal(16,8) DEFAULT NULL, `tax_charge` decimal(16,8) DEFAULT NULL, `hsn` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `payloads` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `order_by` int NOT NULL, `order_status_id` int unsigned DEFAULT NULL, `is_delivery` tinyint(1) NOT NULL DEFAULT '0', `estimate_delivery` int DEFAULT NULL, `is_on_time` tinyint(1) DEFAULT NULL, `is_stock_reduce` tinyint(1) DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `order_details_product_id_foreign_idx` (`product_id`), KEY `order_details_parent_id_foreign_idx` (`parent_id`), KEY `order_details_order_id_foreign_idx` (`order_id`), KEY `order_details_vendor_id_foreign_idx` (`vendor_id`), KEY `order_details_shop_id_foreign_idx` (`shop_id`), KEY `order_details_product_name_index` (`product_name`), KEY `order_details_price_index` (`price`), KEY `order_details_quantity_sent_index` (`quantity_sent`), KEY `order_details_quantity_index` (`quantity`), KEY `order_details_discount_amount_index` (`discount_amount`), KEY `order_details_discount_type_index` (`discount_type`), KEY `order_details_hsn_index` (`hsn`), KEY `order_details_order_by_index` (`order_by`), KEY `order_details_order_status_id_foreign_idx` (`order_status_id`), CONSTRAINT `order_details_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_details_order_status_id_foreign` FOREIGN KEY (`order_status_id`) REFERENCES `order_statuses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_details_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_details_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_details_shop_id_foreign` FOREIGN KEY (`shop_id`) REFERENCES `shops` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_details_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `order_details_product_stats_ins` AFTER INSERT ON `order_details` FOR EACH ROW BEGIN IF NEW.parent_id IS NOT NULL THEN SET @mpid = NEW.parent_id; ELSE SET @mpid = NEW.product_id; END IF; INSERT INTO product_stats (`product_id`,`count_sales`,`date`) VALUES (@mpid, 1, CURDATE()) ON DUPLICATE KEY UPDATE count_sales = count_sales + 1; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `order_note_histories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `order_note_histories` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `order_id` bigint unsigned NOT NULL, `user_id` bigint NOT NULL, `note` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `order_note_histories_order_id_index` (`order_id`), KEY `order_note_histories_user_id_index` (`user_id`), CONSTRAINT `order_note_histories_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_note_histories_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `order_status_histories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `order_status_histories` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `product_id` bigint unsigned DEFAULT NULL, `order_id` bigint unsigned NOT NULL, `user_id` bigint DEFAULT NULL, `order_status_id` int unsigned NOT NULL, `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `order_status_histories_product_id_foreign_idx` (`product_id`), KEY `order_status_histories_order_id_foreign_idx` (`order_id`), KEY `order_status_histories_user_id_foreign_idx` (`user_id`), KEY `order_status_histories_order_status_id_foreign_idx` (`order_status_id`), CONSTRAINT `order_status_histories_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_status_histories_order_status_id_foreign` FOREIGN KEY (`order_status_id`) REFERENCES `order_statuses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_status_histories_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_status_histories_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `order_status_roles`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `order_status_roles` ( `order_status_id` int unsigned NOT NULL, `role_id` int NOT NULL, KEY `order_status_roles_order_status_id_foreign_idx` (`order_status_id`), KEY `order_status_roles_role_id_foreign_idx` (`role_id`), CONSTRAINT `order_status_roles_order_status_id_foreign` FOREIGN KEY (`order_status_id`) REFERENCES `order_statuses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `order_status_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `order_statuses`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `order_statuses` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `payment_scenario` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'unpaid', `color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `is_default` tinyint(1) NOT NULL DEFAULT '0', `order_by` int DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `status_orders_name_index` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `orders`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `orders` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint DEFAULT NULL, `reference` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `order_date` date NOT NULL, `currency_id` int unsigned NOT NULL, `leave_door` tinyint(1) DEFAULT NULL, `other_discount_amount` decimal(16,8) DEFAULT '0.00000000', `other_discount_type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `shipping_charge` decimal(16,8) DEFAULT NULL, `tax_charge` decimal(16,8) DEFAULT NULL, `shipping_title` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `total` decimal(16,8) NOT NULL, `paid` decimal(16,8) NOT NULL, `total_quantity` decimal(16,8) NOT NULL, `amount_received` decimal(16,8) DEFAULT NULL, `order_status_id` int unsigned DEFAULT NULL, `is_delivery` tinyint(1) NOT NULL DEFAULT '0', `payment_status` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Unpaid', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `orders_user_id_foreign_idx` (`user_id`), KEY `orders_reference_index` (`reference`), KEY `orders_order_date_index` (`order_date`), KEY `orders_currency_id_foreign_idx` (`currency_id`), KEY `orders_total_index` (`total`), KEY `orders_paid_index` (`paid`), KEY `orders_amount_received_index` (`amount_received`), KEY `orders_order_status_id_foreign_idx` (`order_status_id`), CONSTRAINT `orders_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `orders_order_status_id_foreign` FOREIGN KEY (`order_status_id`) REFERENCES `order_statuses` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `orders_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `orders_meta`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `orders_meta` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `order_id` bigint unsigned NOT NULL, `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'null', `key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` varchar(10000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `orders_meta_key_order_id_unique` (`key`,`order_id`), KEY `orders_meta_order_id_foreign_idx` (`order_id`), KEY `orders_meta_key_index` (`key`), CONSTRAINT `orders_meta_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `pages`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `pages` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `css` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `description` mediumtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `meta_title` varchar(150) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `meta_description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `layout` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'default', `default` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `password_resets`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `password_resets` ( `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `otp` int DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, KEY `password_resets_email_index` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `payment_logs`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `payment_logs` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `unique_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sending_details` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `response_raw` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `response` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `gateway` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `payment_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `total` decimal(16,8) NOT NULL, `currency_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `payment_logs_code_unique` (`code`), UNIQUE KEY `payment_logs_unique_code_unique` (`unique_code`), CONSTRAINT `payment_logs_code_foreign` FOREIGN KEY (`code`) REFERENCES `orders` (`reference`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `permission_roles`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `permission_roles` ( `permission_id` bigint NOT NULL, `role_id` int NOT NULL, KEY `permission_roles_permission_id_idx` (`permission_id`), KEY `permission_roles_role_id_foreign_idx` (`role_id`), CONSTRAINT `permission_roles_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `permission_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `permissions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `permissions` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `controller_path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `controller_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `method_name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `permissions_name_index` (`name`), KEY `permissions_controller_name_index` (`controller_name`), KEY `permissions_method_name_index` (`method_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `popups`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `popups` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `show_time` int NOT NULL DEFAULT '30' COMMENT 'second', `page_link` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `login_enabled` tinyint(1) NOT NULL DEFAULT '0', `show_again` int DEFAULT NULL COMMENT 'days', `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT 'JSON', `start_date` date DEFAULT NULL, `end_date` date DEFAULT NULL, `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Inactive', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `popups_name_unique` (`name`), KEY `popups_type_index` (`type`), KEY `popups_status_index` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `preferences`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `preferences` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `category` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `field` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `preferences_field_unique` (`field`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `priorities`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `priorities` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), KEY `priorities_name_index` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `product_categories`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `product_categories` ( `product_id` bigint unsigned NOT NULL, `category_id` int NOT NULL, KEY `product_categories_product_id_foreign_idx` (`product_id`), KEY `product_categories_category_id_foreign_idx` (`category_id`), CONSTRAINT `product_categories_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `product_categories_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `product_categories_AINS` AFTER INSERT ON `product_categories` FOR EACH ROW UPDATE categories SET product_counts = (select count(product_id) from product_categories WHERE category_id = categories.id) WHERE categories.id = NEW.category_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `product_categories_ADEL` AFTER DELETE ON `product_categories` FOR EACH ROW UPDATE categories SET product_counts = (select count(product_id) from product_categories WHERE category_id = categories.id) WHERE categories.id = OLD.category_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `product_coupons`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `product_coupons` ( `product_id` bigint unsigned NOT NULL, `coupon_id` bigint unsigned NOT NULL, KEY `product_coupons_product_id_foreign_idx` (`product_id`), KEY `product_coupons_coupon_id_foreign_idx` (`coupon_id`), CONSTRAINT `product_coupons_coupon_id_foreign` FOREIGN KEY (`coupon_id`) REFERENCES `coupons` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `product_coupons_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `product_cross_sales`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `product_cross_sales` ( `product_id` bigint unsigned NOT NULL, `cross_sale_product_id` int NOT NULL, KEY `product_cross_sales_product_id_idx` (`product_id`), KEY `product_cross_sales_cross_sale_product_id_foreign_idx` (`cross_sale_product_id`), CONSTRAINT `product_cross_sales` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `product_relates`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `product_relates` ( `product_id` bigint unsigned NOT NULL, `related_product_id` int NOT NULL, KEY `product_relates_product_id_idx` (`product_id`), KEY `product_relates_related_product_id_foreign_idx` (`related_product_id`), CONSTRAINT `product_relates` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `product_stats`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `product_stats` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `product_id` bigint unsigned NOT NULL, `count_views` int NOT NULL DEFAULT '0', `count_sales` int NOT NULL DEFAULT '0', `date` date NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `product_stats_product_id_date_unique` (`product_id`,`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `product_stats_counter_ins` AFTER INSERT ON `product_stats` FOR EACH ROW BEGIN update products set products.total_views = CASE WHEN NEW.count_views = 1 THEN products.total_views + 1 ELSE products.total_views END, products.total_sales = CASE WHEN NEW.count_sales = 1 THEN products.total_sales + 1 ELSE products.total_sales END WHERE id = NEW.product_id; IF (select `brand_id` from products where id = NEW.product_id) is not null THEN IF NEW.count_views != 0 THEN INSERT INTO brand_stats (`brand_id`,`count_views`,`date`) VALUES ((select `brand_id` from products where id = NEW.product_id), 1, CURDATE()) ON DUPLICATE KEY UPDATE count_views = count_views + 1; END IF; IF NEW.count_sales != 0 THEN INSERT INTO brand_stats (`brand_id`,`count_sales`,`date`) VALUES ((select `brand_id` from products where id = NEW.product_id), 1, CURDATE()) ON DUPLICATE KEY UPDATE count_sales = count_sales + 1; END IF; END IF; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `product_stats_counter_upd` AFTER UPDATE ON `product_stats` FOR EACH ROW BEGIN update products set products.total_views = CASE WHEN OLD.count_views = NEW.count_views THEN products.total_views ELSE products.total_views + 1 END, products.total_sales = CASE WHEN OLD.count_sales = NEW.count_sales THEN products.total_sales ELSE products.total_sales + 1 END WHERE id = NEW.product_id; IF (select `brand_id` from products where id = NEW.product_id) is not null THEN IF NEW.count_views != OLD.count_views THEN INSERT INTO brand_stats (`brand_id`,`count_views`,`date`) VALUES ((select `brand_id` from products where id = NEW.product_id), 1, CURDATE()) ON DUPLICATE KEY UPDATE count_views = count_views + 1; END IF; IF NEW.count_sales != OLD.count_sales THEN INSERT INTO brand_stats (`brand_id`,`count_sales`,`date`) VALUES ((select `brand_id` from products where id = NEW.product_id), 1, CURDATE()) ON DUPLICATE KEY UPDATE count_sales = count_sales + 1; END IF; END IF; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `product_tags`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `product_tags` ( `product_id` bigint unsigned NOT NULL, `tag_id` bigint NOT NULL, KEY `product_tags_product_id_foreign_idx` (`product_id`), KEY `product_tags_tag_id_foreign_idx` (`tag_id`), CONSTRAINT `product_tags_id_foreign` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `product_tags_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `product_tags_AINS` AFTER INSERT ON `product_tags` FOR EACH ROW UPDATE tags SET product_counts = (select count(product_id) from product_tags WHERE tag_id = tags.id) WHERE tags.id = NEW.tag_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `product_tags_ADEL` AFTER DELETE ON `product_tags` FOR EACH ROW UPDATE tags SET product_counts = (select count(product_id) from product_tags WHERE tag_id = tags.id) WHERE tags.id = OLD.tag_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `product_upsales`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `product_upsales` ( `product_id` bigint unsigned NOT NULL, `upsale_product_id` int NOT NULL, KEY `product_upsales_product_id_idx` (`product_id`), KEY `product_upsales_upsale_product_id_foreign_idx` (`upsale_product_id`), CONSTRAINT `product_upsales` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `products`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `products` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `code` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `sku` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `parent_id` bigint unsigned DEFAULT NULL, `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `summary` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `vendor_id` bigint DEFAULT NULL, `shop_id` bigint DEFAULT NULL, `brand_id` int unsigned DEFAULT NULL, `status` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Draft', `total_wish` int NOT NULL DEFAULT '0', `total_sales` int NOT NULL DEFAULT '0', `regular_price` decimal(16,8) DEFAULT NULL, `sale_price` decimal(16,8) DEFAULT NULL, `sale_from` timestamp NULL DEFAULT NULL, `sale_to` timestamp NULL DEFAULT NULL, `available_from` timestamp NULL DEFAULT NULL, `available_to` timestamp NULL DEFAULT NULL, `featured` timestamp NULL DEFAULT NULL, `manage_stocks` tinyint NOT NULL DEFAULT '0', `total_stocks` int NOT NULL DEFAULT '0', `review_count` smallint unsigned DEFAULT '0', `review_average` decimal(6,2) DEFAULT NULL, `total_views` int NOT NULL DEFAULT '0', `type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Simple', `menu_order` smallint unsigned DEFAULT '0', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `products_code_index` (`code`), KEY `products_parent_id_foreign_idx` (`parent_id`), KEY `products_slug_to_index` (`slug`), KEY `products_name_index` (`name`), KEY `products_vendor_id_foreign_idx` (`vendor_id`), KEY `products_shop_id_foreign_idx` (`shop_id`), KEY `products_brand_id_foreign_idx` (`brand_id`), KEY `products_status_index` (`status`), KEY `products_regular_price_index` (`regular_price`), KEY `products_sale_price_index` (`sale_price`), KEY `products_sale_from_index` (`sale_from`), KEY `products_sale_to_index` (`sale_to`), KEY `products_availability_from_index` (`available_from`), KEY `products_availability_to_index` (`available_to`), KEY `product_featured_index` (`featured`), CONSTRAINT `products_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`id`) ON DELETE SET NULL ON UPDATE CASCADE, CONSTRAINT `products_parent_id_foreign` FOREIGN KEY (`parent_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `products_shop_id_foreign` FOREIGN KEY (`shop_id`) REFERENCES `shops` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `products_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `products_AUPD` AFTER UPDATE ON `products` FOR EACH ROW BEGIN IF !(NEW.deleted_at <=> OLD.deleted_at) THEN DELETE FROM product_categories WHERE product_categories.product_id = OLD.id; END IF; END */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `products_meta`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `products_meta` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `product_id` bigint unsigned NOT NULL, `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'null', `key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` varchar(10000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `products_meta_key_product_id_unique` (`key`,`product_id`), KEY `products_meta_product_id_foreign_idx` (`product_id`), KEY `products_meta_key_index` (`key`), CONSTRAINT `products_meta_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `refund_processes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `refund_processes` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint NOT NULL, `refund_id` bigint unsigned NOT NULL, `note` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `refund_processes_user_id_index` (`user_id`), KEY `refund_processes_refund_id_index` (`refund_id`), CONSTRAINT `refund_processes_refund_id_foreign` FOREIGN KEY (`refund_id`) REFERENCES `refunds` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `refund_processes_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `refund_reasons`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `refund_reasons` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending' COMMENT 'Active/Inactive/Pending', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `refund_reasons_name_unique` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `refunds`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `refunds` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint NOT NULL, `order_detail_id` bigint unsigned NOT NULL, `refund_reason_id` int unsigned NOT NULL, `reference` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'unique string', `quantity_sent` int unsigned NOT NULL DEFAULT '1', `refund_type` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Full/Partial', `refund_method` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Wallet/Bank', `shipping_method` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Courier/Drop', `payment_status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Paid/Unpaid', `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Opened/In progress/Declined/Accepted', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `refunds_user_id_index` (`user_id`), KEY `refunds_order_detail_id_index` (`order_detail_id`), KEY `refunds_refund_reason_id_index` (`refund_reason_id`), CONSTRAINT `refunds_order_detail_id_foreign` FOREIGN KEY (`order_detail_id`) REFERENCES `order_details` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `refunds_refund_reason_id_foreign` FOREIGN KEY (`refund_reason_id`) REFERENCES `refund_reasons` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `refunds_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `reviews`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `reviews` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `comments` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `rating` tinyint(1) DEFAULT NULL, `reviewed_by` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_id` bigint DEFAULT NULL, `product_id` bigint unsigned NOT NULL, `is_public` tinyint(1) NOT NULL DEFAULT '0', `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Inactive', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `reviews_user_id_foreign_idx` (`user_id`), KEY `reviews_product_id_foreign_idx` (`product_id`), KEY `reviews_status_index` (`status`), CONSTRAINT `reviews_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `reviews_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `reviews_AINS` AFTER INSERT ON `reviews` FOR EACH ROW UPDATE products SET review_count = (select count(product_id) from reviews WHERE product_id = products.id AND is_public = "1" AND status = "Active"), review_average = (select avg(rating) from reviews WHERE product_id = products.id AND is_public = "1" AND status = "Active") WHERE products.id = NEW.product_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `reviews_AUPD` AFTER UPDATE ON `reviews` FOR EACH ROW UPDATE products SET review_count = (select count(product_id) from reviews WHERE product_id = products.id AND is_public = "1" AND status = "Active"), review_average = (select avg(rating) from reviews WHERE product_id = products.id AND is_public = "1" AND status = "Active") WHERE products.id = NEW.product_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `reviews_ADEL` AFTER DELETE ON `reviews` FOR EACH ROW UPDATE products SET review_count = (select count(product_id) from reviews WHERE product_id = products.id AND is_public = "1" AND status = "Active"), review_average = (select avg(rating) from reviews WHERE product_id = products.id AND is_public = "1" AND status = "Active") WHERE products.id = OLD.product_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `role_users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `role_users` ( `role_id` int NOT NULL, `user_id` bigint NOT NULL, KEY `role_users_role_id_foreign_idx` (`role_id`), KEY `role_users_user_id_foreign_idx` (`user_id`), CONSTRAINT `role_users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `role_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `roles`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `roles` ( `id` int NOT NULL AUTO_INCREMENT, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(70) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `type` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'global' COMMENT 'global, vendor', `description` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `vendor_id` bigint DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `slug_UNIQUE` (`slug`), KEY `roles_name_index` (`name`), KEY `roles_type_index` (`type`), KEY `roles_vendor_id_foreign_idx` (`vendor_id`), CONSTRAINT `roles_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `searches`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `searches` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `total` bigint NOT NULL DEFAULT '1', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `searches_total_index` (`total`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `seos`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `seos` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `product_id` bigint unsigned DEFAULT NULL, `blog_id` bigint unsigned DEFAULT NULL, `title` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `seos_product_id_foreign_idx` (`product_id`), KEY `seos_blog_id_foreign_idx` (`blog_id`), CONSTRAINT `seos_blog_id_foreign` FOREIGN KEY (`blog_id`) REFERENCES `blogs` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `seos_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `shipping_classes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `shipping_classes` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `slug` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `product_count` int NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `shipping_classes_name_index` (`name`), KEY `shipping_classes_slug_index` (`slug`), KEY `shipping_classes_product_count_index` (`product_count`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `shipping_methods`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `shipping_methods` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `status` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Inactive', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `shipping_methods_name_unique` (`name`), KEY `shipping_methods_status_index` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `shipping_zone_geolocales`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `shipping_zone_geolocales` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `shipping_zone_id` int unsigned NOT NULL, `country` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `state` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `city` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `zip` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `shipping_zone_geolocales_shipping_zone_id_index` (`shipping_zone_id`), KEY `shipping_zone_geolocales_country_index` (`country`), KEY `shipping_zone_geolocales_state_index` (`state`), KEY `shipping_zone_geolocales_city_index` (`city`), CONSTRAINT `shipping_zone_geolocales_shipping_zone_id_foreign` FOREIGN KEY (`shipping_zone_id`) REFERENCES `shipping_zones` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `shipping_zone_shipping_classes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `shipping_zone_shipping_classes` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `shipping_zone_id` int unsigned NOT NULL, `shipping_class_slug` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `cost` decimal(16,8) DEFAULT NULL, `cost_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `shipping_zone_shipping_classes_shipping_zone_id_index` (`shipping_zone_id`), KEY `shipping_zone_shipping_classes_shipping_class_slug_index` (`shipping_class_slug`), KEY `shipping_zone_shipping_classes_cost_index` (`cost`), KEY `shipping_zone_shipping_classes_cost_type_index` (`cost_type`), CONSTRAINT `shipping_zone_shipping_classes_shipping_class_slug_foreign` FOREIGN KEY (`shipping_class_slug`) REFERENCES `shipping_classes` (`slug`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `shipping_zone_shipping_classes_shipping_zone_id_foreign` FOREIGN KEY (`shipping_zone_id`) REFERENCES `shipping_zones` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `shipping_zone_shipping_methods`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `shipping_zone_shipping_methods` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `shipping_zone_id` int unsigned NOT NULL, `shipping_method_id` int unsigned NOT NULL, `method_title` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `tax_status` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `cost` decimal(16,8) DEFAULT NULL COMMENT 'free shipping minimum order', `cost_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `calculation_type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'free shipping coupon discount', `requirements` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` tinyint NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `shipping_zone_shipping_methods_shipping_zone_id_index` (`shipping_zone_id`), KEY `shipping_zone_shipping_methods_shipping_method_id_index` (`shipping_method_id`), KEY `shipping_zone_shipping_methods_tax_status_index` (`tax_status`), KEY `shipping_zone_shipping_methods_cost_index` (`cost`), KEY `shipping_zone_shipping_methods_cost_type_index` (`cost_type`), KEY `shipping_zone_shipping_methods_calculation_type_index` (`calculation_type`), KEY `shipping_zone_shipping_methods_requirements_index` (`requirements`), KEY `shipping_zone_shipping_methods_status_index` (`status`), CONSTRAINT `shipping_zone_shipping_methods_shipping_method_id_foreign` FOREIGN KEY (`shipping_method_id`) REFERENCES `shipping_methods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `shipping_zone_shipping_methods_shipping_zone_id_foreign` FOREIGN KEY (`shipping_zone_id`) REFERENCES `shipping_zones` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `shipping_zones`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `shipping_zones` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `shipping_zones_name_index` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `shops`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `shops` ( `id` bigint NOT NULL AUTO_INCREMENT, `vendor_id` bigint NOT NULL, `name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `website` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `alias` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `address` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `country` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `post_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `fax` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description` varchar(5000) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active' COMMENT 'Active/Inactive;', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `shops_alias_unique` (`alias`), KEY `shops_vendor_id_foreign_idx` (`vendor_id`), KEY `shops_name_index` (`name`), KEY `shops_email_index` (`email`), KEY `shops_phone_index` (`phone`), KEY `shops_status_index` (`status`), CONSTRAINT `shops_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `sliders`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `sliders` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `slides`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `slides` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `slider_id` bigint unsigned NOT NULL, `title_text` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `title_animation` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `title_delay` double(4,3) DEFAULT NULL, `title_font_color` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `title_font_size` int DEFAULT NULL, `title_direction` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sub_title_text` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sub_title_animation` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sub_title_delay` double(4,3) DEFAULT NULL, `sub_title_font_color` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sub_title_font_size` int DEFAULT NULL, `sub_title_direction` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description_title_text` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description_title_animation` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description_title_delay` double(4,3) DEFAULT NULL, `description_title_font_color` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description_title_font_size` int DEFAULT NULL, `description_title_direction` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `button_title` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `button_link` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `button_font_color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#ffffff', `button_bg_color` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#000000', `button_position` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `button_animation` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'fadeIn', `button_delay` double(4,3) DEFAULT NULL, `is_open_in_new_window` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Yes', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `slides_slider_id_foreign` (`slider_id`), CONSTRAINT `slides_slider_id_foreign` FOREIGN KEY (`slider_id`) REFERENCES `sliders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `subscribers`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `subscribers` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `confirmation_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active' COMMENT 'Active/Inactive', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `subscribers_email_unique` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `subscription_invoice_items`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `subscription_invoice_items` ( `id` bigint NOT NULL AUTO_INCREMENT, `invoice_id` bigint DEFAULT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `period` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `object_type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `object_id` bigint DEFAULT NULL, `price` decimal(18,8) DEFAULT NULL, `quantity` tinyint DEFAULT NULL, `amount` decimal(16,8) DEFAULT NULL, `discount` decimal(16,8) DEFAULT NULL, `tax_amount` decimal(16,8) DEFAULT NULL, `total` decimal(16,8) DEFAULT NULL, PRIMARY KEY (`id`), KEY `subscription_invoice_items_invoice_id_index` (`invoice_id`), KEY `subscription_invoice_items_object_type_index` (`object_type`), KEY `subscription_invoice_items_object_id_index` (`object_id`), CONSTRAINT `subscription_invoice_items_invoice_id_foreign` FOREIGN KEY (`invoice_id`) REFERENCES `subscription_invoices` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `subscription_invoices`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `subscription_invoices` ( `id` bigint NOT NULL AUTO_INCREMENT, `invoice_date` date DEFAULT NULL, `due_date` date DEFAULT NULL, `object_type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `object_id` bigint DEFAULT NULL, `description` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `transaction_reference` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_address_2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_zip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_country` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billed_amount` decimal(16,8) DEFAULT NULL, `received_amount` decimal(16,8) DEFAULT NULL, `discount_amount` decimal(16,8) DEFAULT NULL, `tax_amount` decimal(16,8) DEFAULT NULL, `balance_amount` decimal(16,8) DEFAULT NULL COMMENT 'Balance has to be zero after payment. (Received + discount) - Billied', `currency` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'USD', `vendor_id` bigint DEFAULT NULL, `user_id` bigint DEFAULT NULL, `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `is_resolved` int DEFAULT '0', `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT 'Draft', `charged_customer_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `charged_amount` decimal(16,8) DEFAULT NULL, `charged_billing_method` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `charged_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `charged_card` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `charged_at` datetime DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `subscription_invoices_invoice_date_index` (`invoice_date`), KEY `subscription_invoices_object_type_index` (`object_type`), KEY `subscription_invoices_object_id_index` (`object_id`), KEY `subscription_invoices_vendor_id_index` (`vendor_id`), KEY `subscription_invoices_user_id_index` (`user_id`), KEY `subscription_invoices_is_resolved_index` (`is_resolved`), KEY `subscription_invoices_status_index` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `subscription_quotes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `subscription_quotes` ( `id` bigint NOT NULL AUTO_INCREMENT, `quote_date` date DEFAULT NULL, `due_date` date DEFAULT NULL, `object_type` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `object_id` bigint DEFAULT NULL, `description` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_address` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_address_2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_city` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_zip` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_state` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_country` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `billing_phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `amount` decimal(16,8) DEFAULT NULL, `currency` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'USD', `vendor_id` bigint DEFAULT NULL, `user_id` bigint DEFAULT NULL, `notes` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `is_resolved` int DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `subscription_quotes_quote_date_index` (`quote_date`), KEY `subscription_quotes_object_type_index` (`object_type`), KEY `subscription_quotes_object_id_index` (`object_id`), KEY `subscription_quotes_vendor_id_index` (`vendor_id`), KEY `subscription_quotes_user_id_index` (`user_id`), KEY `subscription_quotes_is_resolved_index` (`is_resolved`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `tags`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `tags` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `vendor_id` bigint DEFAULT NULL, `product_counts` int unsigned DEFAULT '0', `status` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `tags_name_unique` (`name`), KEY `tags_vendor_id_foreign_idx` (`vendor_id`), KEY `tags_status_index` (`status`), CONSTRAINT `tags_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `tax_classes`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `tax_classes` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `tax_classes_slug_unique` (`slug`), KEY `tax_classes_name_index` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `tax_rates`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `tax_rates` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `tax_class_id` int unsigned NOT NULL, `country` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `state` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `city` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `postcode` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `tax_rate` decimal(16,8) DEFAULT NULL, `priority` int DEFAULT '0', `compound` tinyint DEFAULT NULL, `shipping` tinyint DEFAULT '1', `sort_by` int NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `tax_rates_tax_class_id_index` (`tax_class_id`), KEY `tax_rates_country_index` (`country`), KEY `tax_rates_state_index` (`state`), KEY `tax_rates_city_index` (`city`), KEY `tax_rates_name_index` (`name`), KEY `tax_rates_tax_rate_index` (`tax_rate`), KEY `tax_rates_priority_index` (`priority`), CONSTRAINT `tax_rates_tax_class_id_foreign` FOREIGN KEY (`tax_class_id`) REFERENCES `tax_classes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `theme_options`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `theme_options` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `thread_replies`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `thread_replies` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `thread_id` int unsigned NOT NULL, `sender_id` int unsigned DEFAULT NULL, `receiver_id` int unsigned DEFAULT NULL, `date` datetime DEFAULT NULL, `message` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `has_attachment` tinyint(1) NOT NULL DEFAULT '0', `is_read` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `thread_replies_sender_id_index` (`sender_id`), KEY `thread_replies_receiver_id_index` (`receiver_id`), KEY `thread_replies_date_index` (`date`), KEY `thread_replies_has_attachment_index` (`has_attachment`), KEY `thread_replies_is_read_index` (`is_read`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `thread_statuses`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `thread_statuses` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `name` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status_order` int NOT NULL, `color` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), KEY `thread_statuses_name_index` (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `threads`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `threads` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `receiver_id` bigint DEFAULT NULL, `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `thread_type` varchar(8) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `department_id` int unsigned DEFAULT NULL, `priority_id` int unsigned DEFAULT NULL, `thread_status_id` int unsigned DEFAULT NULL, `thread_key` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `subject` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sender_id` bigint DEFAULT NULL, `date` datetime DEFAULT NULL, `project_id` int unsigned DEFAULT NULL, `last_reply` datetime DEFAULT NULL, `assigned_member_id` int unsigned DEFAULT NULL, PRIMARY KEY (`id`), KEY `threads_receiver_id_foreign_idx` (`receiver_id`), KEY `threads_status_to_index` (`thread_status_id`), KEY `threads_key_to_index` (`thread_key`), KEY `threads_sender_id_index` (`sender_id`), KEY `threads_member_to_index` (`assigned_member_id`), CONSTRAINT `threads_receiver_id_foreign` FOREIGN KEY (`receiver_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `threads_sender_id_foreign` FOREIGN KEY (`sender_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `transactions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `transactions` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint DEFAULT NULL COMMENT 'Who paid for this transaction', `currency_id` int unsigned NOT NULL, `account_id` int DEFAULT NULL COMMENT 'account_id refers accounts table id', `shop_id` bigint DEFAULT NULL, `vendor_id` bigint DEFAULT NULL, `order_id` bigint unsigned DEFAULT NULL, `withdrawal_method_id` int unsigned DEFAULT NULL, `exchange_currency_id` int unsigned DEFAULT NULL, `exchange_rate` decimal(12,8) DEFAULT NULL, `amount` decimal(16,8) DEFAULT NULL COMMENT 'product amount', `charge_amount` decimal(16,8) DEFAULT NULL COMMENT 'payment processor fee', `commission_amount` decimal(16,8) DEFAULT NULL COMMENT 'admin/platform fee', `discount_amount` decimal(16,8) DEFAULT NULL COMMENT 'amount user got as discount', `paid_amount` decimal(16,8) DEFAULT NULL COMMENT 'payer paid after discount', `total_amount` decimal(16,8) DEFAULT NULL COMMENT 'Receiver amount after all fees', `transaction_type` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `transaction_date` date NOT NULL, `reference_number` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `reference_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Pending/Rejected/Accepted', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `transactions_user_id_index` (`user_id`), KEY `transactions_currency_id_index` (`currency_id`), KEY `transactions_account_id_index` (`account_id`), KEY `transactions_shop_id_index` (`shop_id`), KEY `transactions_vendor_id_index` (`vendor_id`), KEY `transactions_order_id_index` (`order_id`), KEY `transactions_withdrawal_method_id_index` (`withdrawal_method_id`), KEY `transactions_exchange_currency_id_index` (`exchange_currency_id`), KEY `transactions_total_amount_index` (`total_amount`), KEY `transactions_transaction_type_index` (`transaction_type`), KEY `transactions_transaction_date_index` (`transaction_date`), KEY `transactions_reference_number_index` (`reference_number`), KEY `transactions_reference_type_index` (`reference_type`), CONSTRAINT `transactions_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transactions_exchange_currency_id_foreign` FOREIGN KEY (`exchange_currency_id`) REFERENCES `currencies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transactions_order_id_foreign` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transactions_shop_id_foreign` FOREIGN KEY (`shop_id`) REFERENCES `shops` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transactions_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `transactions_withdrawal_method_id_foreign` FOREIGN KEY (`withdrawal_method_id`) REFERENCES `withdrawal_methods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `translations`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `translations` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `locale` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `field_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `user_searches`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `user_searches` ( `search_id` bigint unsigned NOT NULL, `user_id` bigint DEFAULT NULL, `browser_agent` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, KEY `user_searches_user_id_foreign_idx` (`user_id`), KEY `user_searches_search_id_foreign` (`search_id`), CONSTRAINT `user_searches_search_id_foreign` FOREIGN KEY (`search_id`) REFERENCES `searches` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `user_searches_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `user_withdrawal_settings`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `user_withdrawal_settings` ( `id` bigint unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint NOT NULL, `withdrawal_method_id` int unsigned NOT NULL, `param` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `is_default` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `user_withdrawal_settings_user_id_index` (`user_id`), KEY `user_withdrawal_settings_withdrawal_method_id_index` (`withdrawal_method_id`), CONSTRAINT `user_withdrawal_settings_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `user_withdrawal_settings_withdrawal_method_id_foreign` FOREIGN KEY (`withdrawal_method_id`) REFERENCES `withdrawal_methods` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `users` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `birthday` date DEFAULT NULL, `gender` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `address` tinytext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `sso_account_id` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sso_service` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `remember_token` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending', `activation_code` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `activation_otp` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `users_name_index` (`name`), KEY `users_email_index` (`email`), KEY `users_status_index` (`status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `users_meta`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `users_meta` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `owner_type` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `owner_id` int NOT NULL, `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'null', `key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `users_meta_key_owner_type_owner_id_unique` (`key`,`owner_type`,`owner_id`), KEY `users_meta_key_index` (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `vendor_users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `vendor_users` ( `id` bigint NOT NULL AUTO_INCREMENT, `vendor_id` bigint NOT NULL, `user_id` bigint NOT NULL, `status` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending', `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `vendor_users_vendor_id_foreign_idx` (`vendor_id`), KEY `vendor_users_user_id_foreign_idx` (`user_id`), KEY `vendor_users_status_index` (`status`), CONSTRAINT `vendor_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `vendor_users_vendor_id_foreign` FOREIGN KEY (`vendor_id`) REFERENCES `vendors` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `vendors`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `vendors` ( `id` bigint NOT NULL AUTO_INCREMENT, `name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `phone` varchar(45) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `formal_name` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(15) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending', `website` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sell_commissions` decimal(16,8) DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `vendors_name_unique` (`name`), UNIQUE KEY `vendors_email_unique` (`email`), KEY `vendors_formal_name` (`formal_name`), KEY `vendors_status_index` (`status`), KEY `vendors_sell_commissions_index` (`sell_commissions`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `vendors_meta`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `vendors_meta` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `owner_type` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `owner_id` int NOT NULL, `type` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'null', `key` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `value` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `vendors_meta_key_owner_type_owner_id_unique` (`key`,`owner_type`,`owner_id`), KEY `vendors_meta_key_index` (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `wallets`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `wallets` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint NOT NULL, `currency_id` int unsigned DEFAULT NULL, `balance` decimal(20,8) NOT NULL DEFAULT '0.00000000', `is_default` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `wallets_user_id_currency_id_unique` (`user_id`,`currency_id`), KEY `wallets_user_id_index` (`user_id`), KEY `wallets_currency_id_index` (`currency_id`), CONSTRAINT `wallets_currency_id_foreign` FOREIGN KEY (`currency_id`) REFERENCES `currencies` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `wallets_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `wishlists`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `wishlists` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `product_id` bigint unsigned NOT NULL, `user_id` bigint NOT NULL, `ip_address` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `browser_agent` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `wishlist_product_id_foreign_idx` (`product_id`), KEY `wishlist_user_id_foreign_idx` (`user_id`), KEY `wishlist_ip_address_index` (`ip_address`), KEY `wishlist_browser_agent_index` (`browser_agent`), CONSTRAINT `wishlist_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `wishlist_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `wishlists_AINS` AFTER INSERT ON `wishlists` FOR EACH ROW UPDATE products SET total_wish = (select count(product_id) from wishlists WHERE product_id = products.id) WHERE products.id = NEW.product_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8mb4 */ ; /*!50003 SET character_set_results = utf8mb4 */ ; /*!50003 SET collation_connection = utf8mb4_unicode_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `wishlists_ADEL` AFTER DELETE ON `wishlists` FOR EACH ROW UPDATE products SET total_wish = (select count(product_id) from wishlists WHERE product_id = products.id) WHERE products.id = OLD.product_id */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; DROP TABLE IF EXISTS `withdrawal_methods`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!50503 SET character_set_client = utf8mb4 */; CREATE TABLE `withdrawal_methods` ( `id` int unsigned NOT NULL AUTO_INCREMENT, `method_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL, `params` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci, `status` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Active/Inactive', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `withdrawal_methods_method_name_unique` (`method_name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; /*!40101 SET character_set_client = @saved_cs_client */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; INSERT INTO `migrations` VALUES (1,'2016_06_01_000001_create_oauth_auth_codes_table',1); INSERT INTO `migrations` VALUES (2,'2016_06_01_000002_create_oauth_access_tokens_table',1); INSERT INTO `migrations` VALUES (3,'2016_06_01_000003_create_oauth_refresh_tokens_table',1); INSERT INTO `migrations` VALUES (4,'2016_06_01_000004_create_oauth_clients_table',1); INSERT INTO `migrations` VALUES (5,'2016_06_01_000005_create_oauth_personal_access_clients_table',1); INSERT INTO `migrations` VALUES (6,'2017_04_08_163453_create_geolocale_cities_locale_table',1); INSERT INTO `migrations` VALUES (7,'2017_04_08_163453_create_geolocale_cities_table',1); INSERT INTO `migrations` VALUES (8,'2017_04_08_163453_create_geolocale_continents_locale_table',1); INSERT INTO `migrations` VALUES (9,'2017_04_08_163453_create_geolocale_continents_table',1); INSERT INTO `migrations` VALUES (10,'2017_04_08_163453_create_geolocale_countries_locale_table',1); INSERT INTO `migrations` VALUES (11,'2017_04_08_163453_create_geolocale_countries_table',1); INSERT INTO `migrations` VALUES (12,'2017_04_08_163453_create_geolocale_divisions_locale_table',1); INSERT INTO `migrations` VALUES (13,'2017_04_08_163453_create_geolocale_divisions_table',1); INSERT INTO `migrations` VALUES (14,'2017_04_08_163454_add_foreign_keys_to_geolocale_cities_locale_table',1); INSERT INTO `migrations` VALUES (15,'2017_04_08_163454_add_foreign_keys_to_geolocale_cities_table',1); INSERT INTO `migrations` VALUES (16,'2017_04_08_163454_add_foreign_keys_to_geolocale_continents_locale_table',1); INSERT INTO `migrations` VALUES (17,'2017_04_08_163454_add_foreign_keys_to_geolocale_countries_locale_table',1); INSERT INTO `migrations` VALUES (18,'2017_04_08_163454_add_foreign_keys_to_geolocale_countries_table',1); INSERT INTO `migrations` VALUES (19,'2017_04_08_163454_add_foreign_keys_to_geolocale_divisions_locale_table',1); INSERT INTO `migrations` VALUES (20,'2017_04_08_163454_add_foreign_keys_to_geolocale_divisions_table',1); INSERT INTO `migrations` VALUES (21,'2017_08_11_073824_create_menus_wp_table',1); INSERT INTO `migrations` VALUES (22,'2017_08_11_074006_create_menu_items_wp_table',1); INSERT INTO `migrations` VALUES (23,'2019_12_23_153024_create_geolocale_languages_table',1); INSERT INTO `migrations` VALUES (24,'2020_04_06_093559_create_departments_table',1); INSERT INTO `migrations` VALUES (25,'2020_04_06_093559_create_priorities_table',1); INSERT INTO `migrations` VALUES (26,'2020_04_06_093559_create_thread_replies_table',1); INSERT INTO `migrations` VALUES (27,'2020_04_06_093559_create_thread_statuses_table',1); INSERT INTO `migrations` VALUES (28,'2021_06_17_131601_create_canned_messages_table',1); INSERT INTO `migrations` VALUES (29,'2021_06_17_145137_create_canned_links_table',1); INSERT INTO `migrations` VALUES (30,'2021_07_22_172545_add_timezone_to_geolocale_cities_table',1); INSERT INTO `migrations` VALUES (31,'2021_07_22_221136_add_code_numeric_to_geolocale_countries',1); INSERT INTO `migrations` VALUES (32,'2021_10_10_065927_create_attribute_groups_table',1); INSERT INTO `migrations` VALUES (33,'2021_10_10_065927_create_attribute_values_table',1); INSERT INTO `migrations` VALUES (34,'2021_10_10_065927_create_attributes_table',1); INSERT INTO `migrations` VALUES (35,'2021_10_10_065927_create_backups_table',1); INSERT INTO `migrations` VALUES (36,'2021_10_10_065927_create_brands_table',1); INSERT INTO `migrations` VALUES (37,'2021_10_10_065927_create_categories_table',1); INSERT INTO `migrations` VALUES (38,'2021_10_10_065927_create_category_attributes_table',1); INSERT INTO `migrations` VALUES (39,'2021_10_10_065927_create_countries_table',1); INSERT INTO `migrations` VALUES (40,'2021_10_10_065927_create_coupons_table',1); INSERT INTO `migrations` VALUES (41,'2021_10_10_065927_create_currencies_table',1); INSERT INTO `migrations` VALUES (42,'2021_10_10_065927_create_email_configurations_table',1); INSERT INTO `migrations` VALUES (43,'2021_10_10_065927_create_email_templates_table',1); INSERT INTO `migrations` VALUES (44,'2021_10_10_065927_create_failed_jobs_table',1); INSERT INTO `migrations` VALUES (45,'2021_10_10_065927_create_favourites_table',1); INSERT INTO `migrations` VALUES (46,'2021_10_10_065927_create_flash_sales_table',1); INSERT INTO `migrations` VALUES (47,'2021_10_10_065927_create_languages_table',1); INSERT INTO `migrations` VALUES (48,'2021_10_10_065927_create_locations_table',1); INSERT INTO `migrations` VALUES (49,'2021_10_10_065927_create_menus_table',1); INSERT INTO `migrations` VALUES (50,'2021_10_10_065927_create_password_resets_table',1); INSERT INTO `migrations` VALUES (51,'2021_10_10_065927_create_permission_roles_table',1); INSERT INTO `migrations` VALUES (52,'2021_10_10_065927_create_permissions_table',1); INSERT INTO `migrations` VALUES (53,'2021_10_10_065927_create_popups_table',1); INSERT INTO `migrations` VALUES (54,'2021_10_10_065927_create_preferences_table',1); INSERT INTO `migrations` VALUES (55,'2021_10_10_065927_create_product_categories_table',1); INSERT INTO `migrations` VALUES (56,'2021_10_10_065927_create_product_cross_sales_table',1); INSERT INTO `migrations` VALUES (57,'2021_10_10_065927_create_product_relates_table',1); INSERT INTO `migrations` VALUES (58,'2021_10_10_065927_create_product_tags_table',1); INSERT INTO `migrations` VALUES (59,'2021_10_10_065927_create_product_upsales_table',1); INSERT INTO `migrations` VALUES (60,'2021_10_10_065927_create_products_table',1); INSERT INTO `migrations` VALUES (61,'2021_10_10_065927_create_reviews_table',1); INSERT INTO `migrations` VALUES (62,'2021_10_10_065927_create_role_users_table',1); INSERT INTO `migrations` VALUES (63,'2021_10_10_065927_create_roles_table',1); INSERT INTO `migrations` VALUES (64,'2021_10_10_065927_create_shops_table',1); INSERT INTO `migrations` VALUES (65,'2021_10_10_065927_create_subscription_invoice_items_table',1); INSERT INTO `migrations` VALUES (66,'2021_10_10_065927_create_subscription_invoices_table',1); INSERT INTO `migrations` VALUES (67,'2021_10_10_065927_create_subscription_quotes_table',1); INSERT INTO `migrations` VALUES (68,'2021_10_10_065927_create_tags_table',1); INSERT INTO `migrations` VALUES (69,'2021_10_10_065927_create_translations_table',1); INSERT INTO `migrations` VALUES (70,'2021_10_10_065927_create_users_table',1); INSERT INTO `migrations` VALUES (71,'2021_10_10_065927_create_vendor_users_table',1); INSERT INTO `migrations` VALUES (72,'2021_10_10_065927_create_vendors_table',1); INSERT INTO `migrations` VALUES (73,'2021_10_10_065927_create_wishlists_table',1); INSERT INTO `migrations` VALUES (74,'2021_10_10_065928_add_foreign_keys_to_attribute_groups_table',1); INSERT INTO `migrations` VALUES (75,'2021_10_10_065928_add_foreign_keys_to_attribute_values_table',1); INSERT INTO `migrations` VALUES (76,'2021_10_10_065928_add_foreign_keys_to_attributes_table',1); INSERT INTO `migrations` VALUES (77,'2021_10_10_065928_add_foreign_keys_to_brands_table',1); INSERT INTO `migrations` VALUES (78,'2021_10_10_065928_add_foreign_keys_to_categories_table',1); INSERT INTO `migrations` VALUES (79,'2021_10_10_065928_add_foreign_keys_to_category_attributes_table',1); INSERT INTO `migrations` VALUES (80,'2021_10_10_065928_add_foreign_keys_to_coupons_table',1); INSERT INTO `migrations` VALUES (81,'2021_10_10_065928_add_foreign_keys_to_email_templates_table',1); INSERT INTO `migrations` VALUES (82,'2021_10_10_065928_add_foreign_keys_to_favourites_table',1); INSERT INTO `migrations` VALUES (83,'2021_10_10_065928_add_foreign_keys_to_flash_sales_table',1); INSERT INTO `migrations` VALUES (84,'2021_10_10_065928_add_foreign_keys_to_permission_roles_table',1); INSERT INTO `migrations` VALUES (85,'2021_10_10_065928_add_foreign_keys_to_product_categories_table',1); INSERT INTO `migrations` VALUES (86,'2021_10_10_065928_add_foreign_keys_to_product_cross_sales_table',1); INSERT INTO `migrations` VALUES (87,'2021_10_10_065928_add_foreign_keys_to_product_relates_table',1); INSERT INTO `migrations` VALUES (88,'2021_10_10_065928_add_foreign_keys_to_product_tags_table',1); INSERT INTO `migrations` VALUES (89,'2021_10_10_065928_add_foreign_keys_to_product_upsales_table',1); INSERT INTO `migrations` VALUES (90,'2021_10_10_065928_add_foreign_keys_to_products_table',1); INSERT INTO `migrations` VALUES (91,'2021_10_10_065928_add_foreign_keys_to_reviews_table',1); INSERT INTO `migrations` VALUES (92,'2021_10_10_065928_add_foreign_keys_to_role_users_table',1); INSERT INTO `migrations` VALUES (93,'2021_10_10_065928_add_foreign_keys_to_roles_table',1); INSERT INTO `migrations` VALUES (94,'2021_10_10_065928_add_foreign_keys_to_shops_table',1); INSERT INTO `migrations` VALUES (95,'2021_10_10_065928_add_foreign_keys_to_subscription_invoice_items_table',1); INSERT INTO `migrations` VALUES (96,'2021_10_10_065928_add_foreign_keys_to_tags_table',1); INSERT INTO `migrations` VALUES (97,'2021_10_10_065928_add_foreign_keys_to_vendor_users_table',1); INSERT INTO `migrations` VALUES (98,'2021_10_10_065928_add_foreign_keys_to_wishlists_table',1); INSERT INTO `migrations` VALUES (99,'2021_10_10_065928_create_addresses_table',1); INSERT INTO `migrations` VALUES (100,'2021_10_10_065929_add_foreign_keys_to_addresses_table',1); INSERT INTO `migrations` VALUES (101,'2021_10_10_065929_create_coupon_redeems_table',1); INSERT INTO `migrations` VALUES (102,'2021_10_10_065930_add_foreign_keys_to_coupon_redeems_table',1); INSERT INTO `migrations` VALUES (103,'2021_10_10_065931_create_product_coupons_table',1); INSERT INTO `migrations` VALUES (104,'2021_10_10_065932_add_foreign_keys_to_product_coupons_table',1); INSERT INTO `migrations` VALUES (105,'2021_11_25_072702_tag_trigger',1); INSERT INTO `migrations` VALUES (106,'2021_11_25_072726_category_trigger',1); INSERT INTO `migrations` VALUES (107,'2021_11_25_072727_product_category_trigger',1); INSERT INTO `migrations` VALUES (108,'2021_11_25_072819_coupon_trigger',1); INSERT INTO `migrations` VALUES (109,'2021_12_15_064237_create_blog_categories_table',1); INSERT INTO `migrations` VALUES (110,'2021_12_15_064237_create_blogs_table',1); INSERT INTO `migrations` VALUES (111,'2021_12_15_064237_create_files_table',1); INSERT INTO `migrations` VALUES (112,'2021_12_15_064237_create_object_files_table',1); INSERT INTO `migrations` VALUES (113,'2021_12_15_064237_create_pages_table',1); INSERT INTO `migrations` VALUES (114,'2021_12_15_064237_create_sliders_table',1); INSERT INTO `migrations` VALUES (115,'2021_12_15_064237_create_slides_table',1); INSERT INTO `migrations` VALUES (116,'2021_12_15_064237_create_theme_options_table',1); INSERT INTO `migrations` VALUES (117,'2021_12_16_111707_create_order_statuses_table',1); INSERT INTO `migrations` VALUES (118,'2021_12_16_111710_create_orders_table',1); INSERT INTO `migrations` VALUES (119,'2021_12_16_111711_add_foreign_keys_to_orders_table',1); INSERT INTO `migrations` VALUES (120,'2021_12_16_111712_create_order_details_table',1); INSERT INTO `migrations` VALUES (121,'2021_12_16_111713_add_foreign_keys_to_order_details_table',1); INSERT INTO `migrations` VALUES (122,'2022_01_18_072726_create_brand_stats_table',1); INSERT INTO `migrations` VALUES (123,'2022_01_18_072726_create_category_stats_table',1); INSERT INTO `migrations` VALUES (124,'2022_01_18_072726_create_product_stats_table',1); INSERT INTO `migrations` VALUES (125,'2022_01_18_072726_product_trigger',1); INSERT INTO `migrations` VALUES (126,'2022_01_31_093341_create_order_status_roles_table',1); INSERT INTO `migrations` VALUES (127,'2022_01_31_093342_add_foreign_keys_to_order_status_roles_table',1); INSERT INTO `migrations` VALUES (128,'2022_01_31_093450_create_order_status_histories_table',1); INSERT INTO `migrations` VALUES (129,'2022_01_31_093451_add_foreign_keys_to_order_status_histories_table',1); INSERT INTO `migrations` VALUES (130,'2022_02_06_031637_create_gateways_table',1); INSERT INTO `migrations` VALUES (131,'2022_02_09_035343_create_commissions_table',1); INSERT INTO `migrations` VALUES (132,'2022_02_09_045059_create_payment_log_table',1); INSERT INTO `migrations` VALUES (133,'2022_02_09_045060_add_foreign_keys_to_payment_log_table',1); INSERT INTO `migrations` VALUES (134,'2022_02_13_0000035_create_wallets_table',1); INSERT INTO `migrations` VALUES (135,'2022_02_13_0000037_add_foreign_keys_to_wallets_table',1); INSERT INTO `migrations` VALUES (136,'2022_02_14_095733_create_order_commissions_table',1); INSERT INTO `migrations` VALUES (137,'2022_02_14_095734_add_foreign_keys_to_order_commissions_table',1); INSERT INTO `migrations` VALUES (138,'2022_02_15_0000040_create_withdrawal_methods_table',1); INSERT INTO `migrations` VALUES (139,'2022_02_15_0000041_create_user_withdrawal_settings_table',1); INSERT INTO `migrations` VALUES (140,'2022_02_15_0000042_add_foreign_keys_to_user_withdrawal_settings_table',1); INSERT INTO `migrations` VALUES (141,'2022_02_15_0000043_create_transactions_table',1); INSERT INTO `migrations` VALUES (142,'2022_02_15_0000044_add_foreign_keys_to_transactions_table',1); INSERT INTO `migrations` VALUES (143,'2022_02_23_032454_create_refund_reasons_table',1); INSERT INTO `migrations` VALUES (144,'2022_02_23_032713_create_refunds_table',1); INSERT INTO `migrations` VALUES (145,'2022_02_23_032814_create_refund_processes_table',1); INSERT INTO `migrations` VALUES (146,'2022_02_23_032815_add_foreign_keys_to_refunds_table',1); INSERT INTO `migrations` VALUES (147,'2022_02_23_032820_add_foreign_keys_to_refund_processes_table',1); INSERT INTO `migrations` VALUES (148,'2022_03_06_050657_create_layout_types_table',1); INSERT INTO `migrations` VALUES (149,'2022_03_06_050741_create_layouts_table',1); INSERT INTO `migrations` VALUES (150,'2022_03_06_051329_create_components_table',1); INSERT INTO `migrations` VALUES (151,'2022_03_06_051911_create_component_properties_table',1); INSERT INTO `migrations` VALUES (152,'2022_03_21_095426_create_forms_table',1); INSERT INTO `migrations` VALUES (153,'2022_03_21_095438_create_form_submission_table',1); INSERT INTO `migrations` VALUES (154,'2022_04_06_104628_create_seos_table',1); INSERT INTO `migrations` VALUES (155,'2022_04_06_104629_add_foreign_keys_to_seos_table',1); INSERT INTO `migrations` VALUES (156,'2022_04_27_080907_create_subscribers_table',1); INSERT INTO `migrations` VALUES (157,'2022_05_18_074840_create_users_meta',1); INSERT INTO `migrations` VALUES (158,'2022_05_18_092750_create_searches_table',1); INSERT INTO `migrations` VALUES (159,'2022_05_18_092820_create_user_searches_table',1); INSERT INTO `migrations` VALUES (160,'2022_05_18_092821_add_foreign_keys_to_user_searches_table',1); INSERT INTO `migrations` VALUES (161,'2022_05_18_094636_create_metas',1); INSERT INTO `migrations` VALUES (162,'2022_06_01_052314_create_order_note_histories_table',1); INSERT INTO `migrations` VALUES (163,'2022_06_01_052414_add_foreign_keys_to_order_note_histories_table',1); INSERT INTO `migrations` VALUES (164,'2022_06_07_050839_create_products_meta_table',1); INSERT INTO `migrations` VALUES (165,'2022_06_30_051457_create_tax_classes_table',1); INSERT INTO `migrations` VALUES (166,'2022_06_30_051511_create_tax_rates_table',1); INSERT INTO `migrations` VALUES (167,'2022_06_30_051559_add_foreign_keys_to_tax_rates_table',1); INSERT INTO `migrations` VALUES (168,'2022_07_22_064237_create_shipping_methods_table',1); INSERT INTO `migrations` VALUES (169,'2022_07_22_064238_create_shipping_classes_table',1); INSERT INTO `migrations` VALUES (170,'2022_07_22_064239_create_shipping_zones_table',1); INSERT INTO `migrations` VALUES (171,'2022_07_22_064240_create_shipping_zone_geolocales_table',1); INSERT INTO `migrations` VALUES (172,'2022_07_22_064240_create_shipping_zone_shipping_classes_table',1); INSERT INTO `migrations` VALUES (173,'2022_07_22_064240_create_shipping_zone_shipping_methods_table',1); INSERT INTO `migrations` VALUES (174,'2022_07_22_064242_add_foreign_keys_to_shipping_zone_shipping_classes_table',1); INSERT INTO `migrations` VALUES (175,'2022_07_22_064243_add_foreign_keys_to_shipping_zone_geolocales_table',1); INSERT INTO `migrations` VALUES (176,'2022_07_22_064243_add_foreign_keys_to_shipping_zone_shipping_methods_table',1); INSERT INTO `migrations` VALUES (177,'2022_08_22_073603_add_foreign_keys_to_products_meta_table',1); INSERT INTO `migrations` VALUES (178,'2022_09_04_050839_create_coupons_meta_table',1); INSERT INTO `migrations` VALUES (179,'2022_09_04_050839_create_orders_meta_table',1); INSERT INTO `migrations` VALUES (180,'2022_09_05_073603_add_foreign_keys_to_coupons_meta_table',1); INSERT INTO `migrations` VALUES (181,'2022_09_05_073603_add_foreign_keys_to_orders_meta_table',1); INSERT INTO `migrations` VALUES (182,'2022_10_03_060019_create_vendors_meta_table',1); INSERT INTO `migrations` VALUES (183,'2022_10_30_062626_create_activity_log_table',1); INSERT INTO `migrations` VALUES (184,'2023_01_05_023932_blog_trigger',1); INSERT INTO `migrations` VALUES (185,'2023_04_06_093559_create_threads_table',1);