CREATE TABLE `quote_item_option` (
  `option_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option ID',
  `item_id` int unsigned NOT NULL COMMENT 'Item ID',
  `product_id` int unsigned NOT NULL COMMENT 'Product ID',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `value` text COMMENT 'Value',
  PRIMARY KEY (`option_id`),
  KEY `QUOTE_ITEM_OPTION_ITEM_ID` (`item_id`),
  CONSTRAINT `QUOTE_ITEM_OPTION_ITEM_ID_QUOTE_ITEM_ITEM_ID` FOREIGN KEY (`item_id`) REFERENCES `quote_item` (`item_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Quote Item Option';

--
-- Dumping data for table `quote_item_option`
--

INSERT INTO `quote_item_option` VALUES (23,23,11330,'info_buyRequest','{\"uenc\":\"aHR0cHM6Ly9oeXZhLXN0YWdpbmcubmV4dXMtaG9tZS5jb20vYmV0dGUtd2FzdGUtYW5kLW92ZXJmbG93LWZpdHRpbmctd2l0aC1maWxsZXItbW9uby1mbG93LW81Mi1tbS1lbmFtZWxsZWQtd2hpdGUuaHRtbA~~\",\"product\":\"11330\",\"selected_configurable_option\":\"\",\"related_product\":\"\",\"item\":\"11330\",\"id\":\"11330\",\"qty\":1}'),(24,24,11330,'info_buyRequest','{\"uenc\":\"aHR0cHM6Ly9oeXZhLXN0YWdpbmcubmV4dXMtaG9tZS5jb20vYmV0dGUtd2FzdGUtYW5kLW92ZXJmbG93LWZpdHRpbmctd2l0aC1maWxsZXItbW9uby1mbG93LW81Mi1tbS1lbmFtZWxsZWQtd2hpdGUuaHRtbA~~\",\"product\":\"11330\",\"selected_configurable_option\":\"\",\"related_product\":\"\",\"item\":\"11330\",\"id\":\"11330\",\"qty\":1}');

--
-- Table structure for table `quote_payment`
--

CREATE TABLE `quote_payment` (
  `payment_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Payment ID',
  `quote_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Quote ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `method` varchar(255) DEFAULT NULL COMMENT 'Method',
  `cc_type` varchar(255) DEFAULT NULL COMMENT 'Cc Type',
  `cc_number_enc` varchar(255) DEFAULT NULL COMMENT 'Cc Number Enc',
  `cc_last_4` varchar(255) DEFAULT NULL COMMENT 'Cc Last 4',
  `cc_cid_enc` varchar(255) DEFAULT NULL COMMENT 'Cc Cid Enc',
  `cc_owner` varchar(255) DEFAULT NULL COMMENT 'Cc Owner',
  `cc_exp_month` varchar(255) DEFAULT NULL COMMENT 'Cc Exp Month',
  `cc_exp_year` smallint unsigned DEFAULT '0' COMMENT 'Cc Exp Year',
  `cc_ss_owner` varchar(255) DEFAULT NULL COMMENT 'Cc Ss Owner',
  `cc_ss_start_month` smallint unsigned DEFAULT '0' COMMENT 'Cc Ss Start Month',
  `cc_ss_start_year` smallint unsigned DEFAULT '0' COMMENT 'Cc Ss Start Year',
  `po_number` varchar(255) DEFAULT NULL COMMENT 'Po Number',
  `additional_data` text COMMENT 'Additional Data',
  `cc_ss_issue` varchar(255) DEFAULT NULL COMMENT 'Cc Ss Issue',
  `additional_information` text COMMENT 'Additional Information',
  `paypal_payer_id` varchar(255) DEFAULT NULL COMMENT 'Paypal Payer ID',
  `paypal_payer_status` varchar(255) DEFAULT NULL COMMENT 'Paypal Payer Status',
  `paypal_correlation_id` varchar(255) DEFAULT NULL COMMENT 'Paypal Correlation ID',
  PRIMARY KEY (`payment_id`),
  KEY `QUOTE_PAYMENT_QUOTE_ID` (`quote_id`),
  CONSTRAINT `QUOTE_PAYMENT_QUOTE_ID_QUOTE_ENTITY_ID` FOREIGN KEY (`quote_id`) REFERENCES `quote` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Quote Payment';

--
-- Dumping data for table `quote_payment`
--

INSERT INTO `quote_payment` VALUES (20,24,'2025-04-08 09:49:49','2025-04-08 09:49:49',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,'null',NULL,NULL,NULL),(21,25,'2025-04-08 09:49:49','2025-04-08 09:49:49',NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,0,0,NULL,NULL,NULL,'null',NULL,NULL,NULL);

--
-- Table structure for table `quote_shipping_rate`
--

CREATE TABLE `quote_shipping_rate` (
  `rate_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rate ID',
  `address_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Address ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `carrier` varchar(255) DEFAULT NULL COMMENT 'Carrier',
  `carrier_title` varchar(255) DEFAULT NULL COMMENT 'Carrier Title',
  `code` varchar(255) DEFAULT NULL COMMENT 'Code',
  `method` varchar(255) DEFAULT NULL COMMENT 'Method',
  `method_description` text COMMENT 'Method Description',
  `price` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `error_message` text COMMENT 'Error Message',
  `method_title` text COMMENT 'Method Title',
  PRIMARY KEY (`rate_id`),
  KEY `QUOTE_SHIPPING_RATE_ADDRESS_ID` (`address_id`),
  CONSTRAINT `QUOTE_SHIPPING_RATE_ADDRESS_ID_QUOTE_ADDRESS_ADDRESS_ID` FOREIGN KEY (`address_id`) REFERENCES `quote_address` (`address_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Quote Shipping Rate';

--
-- Dumping data for table `quote_shipping_rate`
--


--
-- Table structure for table `rating`
--

CREATE TABLE `rating` (
  `rating_id` smallint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rating ID',
  `entity_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `rating_code` varchar(64) NOT NULL COMMENT 'Rating Code',
  `position` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Position On Storefront',
  `is_active` smallint NOT NULL DEFAULT '1' COMMENT 'Rating is active.',
  PRIMARY KEY (`rating_id`),
  UNIQUE KEY `RATING_RATING_CODE` (`rating_code`),
  KEY `RATING_ENTITY_ID` (`entity_id`),
  CONSTRAINT `RATING_ENTITY_ID_RATING_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `rating_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COMMENT='Ratings';

--
-- Dumping data for table `rating`
--

INSERT INTO `rating` VALUES (1,1,'Quality',0,1),(2,1,'Value',0,1),(3,1,'Price',0,1);

--
-- Table structure for table `rating_entity`
--

CREATE TABLE `rating_entity` (
  `entity_id` smallint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `entity_code` varchar(64) NOT NULL COMMENT 'Entity Code',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `RATING_ENTITY_ENTITY_CODE` (`entity_code`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COMMENT='Rating entities';

--
-- Dumping data for table `rating_entity`
--

INSERT INTO `rating_entity` VALUES (1,'product'),(2,'product_review'),(3,'review');

--
-- Table structure for table `rating_option`
--

CREATE TABLE `rating_option` (
  `option_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rating Option ID',
  `rating_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `code` varchar(32) NOT NULL COMMENT 'Rating Option Code',
  `value` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Option Value',
  `position` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Ration option position on Storefront',
  PRIMARY KEY (`option_id`),
  KEY `RATING_OPTION_RATING_ID` (`rating_id`),
  CONSTRAINT `RATING_OPTION_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb3 COMMENT='Rating options';

--
-- Dumping data for table `rating_option`
--

INSERT INTO `rating_option` VALUES (1,1,'1',1,1),(2,1,'2',2,2),(3,1,'3',3,3),(4,1,'4',4,4),(5,1,'5',5,5),(6,2,'1',1,1),(7,2,'2',2,2),(8,2,'3',3,3),(9,2,'4',4,4),(10,2,'5',5,5),(11,3,'1',1,1),(12,3,'2',2,2),(13,3,'3',3,3),(14,3,'4',4,4),(15,3,'5',5,5);

--
-- Table structure for table `rating_option_vote`
--

CREATE TABLE `rating_option_vote` (
  `vote_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Vote ID',
  `option_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Vote option ID',
  `remote_ip` varchar(16) NOT NULL COMMENT 'Customer IP',
  `remote_ip_long` bigint NOT NULL DEFAULT '0' COMMENT 'Customer IP converted to long integer format',
  `customer_id` int unsigned DEFAULT '0' COMMENT 'Customer ID',
  `entity_pk_value` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `rating_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `review_id` bigint unsigned DEFAULT NULL COMMENT 'Review ID',
  `percent` smallint NOT NULL DEFAULT '0' COMMENT 'Percent amount',
  `value` smallint NOT NULL DEFAULT '0' COMMENT 'Vote option value',
  PRIMARY KEY (`vote_id`),
  KEY `RATING_OPTION_VOTE_REVIEW_ID_REVIEW_REVIEW_ID` (`review_id`),
  KEY `RATING_OPTION_VOTE_OPTION_ID` (`option_id`),
  CONSTRAINT `RATING_OPTION_VOTE_OPTION_ID_RATING_OPTION_OPTION_ID` FOREIGN KEY (`option_id`) REFERENCES `rating_option` (`option_id`) ON DELETE CASCADE,
  CONSTRAINT `RATING_OPTION_VOTE_REVIEW_ID_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb3 COMMENT='Rating option values';

--
-- Dumping data for table `rating_option_vote`
--

INSERT INTO `rating_option_vote` VALUES (31,5,'162.158.62.69',2728279621,NULL,7915,1,17,100,5),(32,10,'162.158.62.69',2728279621,NULL,7915,2,17,100,5),(33,15,'162.158.62.69',2728279621,NULL,7915,3,17,100,5),(34,5,'162.158.155.15',2728303375,NULL,11246,1,18,100,5),(35,10,'162.158.155.15',2728303375,NULL,11246,2,18,100,5),(36,15,'162.158.155.15',2728303375,NULL,11246,3,18,100,5);

--
-- Table structure for table `rating_option_vote_aggregated`
--

CREATE TABLE `rating_option_vote_aggregated` (
  `primary_id` int NOT NULL AUTO_INCREMENT COMMENT 'Vote aggregation ID',
  `rating_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `entity_pk_value` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `vote_count` int unsigned NOT NULL DEFAULT '0' COMMENT 'Vote dty',
  `vote_value_sum` int unsigned NOT NULL DEFAULT '0' COMMENT 'General vote sum',
  `percent` smallint NOT NULL DEFAULT '0' COMMENT 'Vote percent',
  `percent_approved` smallint DEFAULT '0' COMMENT 'Vote percent approved by admin',
  `store_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  PRIMARY KEY (`primary_id`),
  KEY `RATING_OPTION_VOTE_AGGREGATED_RATING_ID` (`rating_id`),
  KEY `RATING_OPTION_VOTE_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `RATING_OPTION_VOTE_AGGREGATED_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE,
  CONSTRAINT `RATING_OPTION_VOTE_AGGREGATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb3 COMMENT='Rating vote aggregated';

--
-- Dumping data for table `rating_option_vote_aggregated`
--

INSERT INTO `rating_option_vote_aggregated` VALUES (31,1,7915,1,5,100,100,0),(32,1,7915,1,5,100,100,1),(33,2,7915,1,5,100,100,0),(34,2,7915,1,5,100,100,1),(35,3,7915,1,5,100,100,0),(36,3,7915,1,5,100,100,1),(37,1,11246,1,5,100,0,0),(38,1,11246,1,5,100,0,1),(39,2,11246,1,5,100,0,0),(40,2,11246,1,5,100,0,1),(41,3,11246,1,5,100,0,0),(42,3,11246,1,5,100,0,1);

--
-- Table structure for table `rating_store`
--

CREATE TABLE `rating_store` (
  `rating_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `store_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  PRIMARY KEY (`rating_id`,`store_id`),
  KEY `RATING_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `RATING_STORE_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE,
  CONSTRAINT `RATING_STORE_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Rating Store';

--
-- Dumping data for table `rating_store`
--

INSERT INTO `rating_store` VALUES (1,0),(2,0),(3,0),(1,1),(2,1),(3,1);

--
-- Table structure for table `rating_title`
--

CREATE TABLE `rating_title` (
  `rating_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `store_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `value` varchar(255) NOT NULL COMMENT 'Rating Label',
  PRIMARY KEY (`rating_id`,`store_id`),
  KEY `RATING_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `RATING_TITLE_RATING_ID_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `rating` (`rating_id`) ON DELETE CASCADE,
  CONSTRAINT `RATING_TITLE_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Rating Title';

--
-- Dumping data for table `rating_title`
--


--
-- Table structure for table `release_notification_viewer_log`
--

CREATE TABLE `release_notification_viewer_log` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log ID',
  `viewer_id` int unsigned NOT NULL COMMENT 'Viewer admin user ID',
  `last_view_version` varchar(16) NOT NULL COMMENT 'Viewer last view on product version',
  PRIMARY KEY (`id`),
  UNIQUE KEY `RELEASE_NOTIFICATION_VIEWER_LOG_VIEWER_ID` (`viewer_id`),
  CONSTRAINT `RELEASE_NOTIFICATION_VIEWER_LOG_VIEWER_ID_ADMIN_USER_USER_ID` FOREIGN KEY (`viewer_id`) REFERENCES `admin_user` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Release Notification Viewer Log Table';

--
-- Dumping data for table `release_notification_viewer_log`
--


--
-- Table structure for table `report_compared_product_index`
--

CREATE TABLE `report_compared_product_index` (
  `index_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Index ID',
  `visitor_id` int unsigned DEFAULT NULL COMMENT 'Visitor ID',
  `customer_id` int unsigned DEFAULT NULL COMMENT 'Customer ID',
  `product_id` int unsigned NOT NULL COMMENT 'Product ID',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `added_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `REPORT_COMPARED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `REPORT_COMPARED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `REPORT_COMPARED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `REPORT_COMPARED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `REPORT_COMPARED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`),
  CONSTRAINT `REPORT_CMPD_PRD_IDX_CSTR_ID_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `REPORT_CMPD_PRD_IDX_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `REPORT_COMPARED_PRODUCT_INDEX_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Reports Compared Product Index Table';

--
-- Dumping data for table `report_compared_product_index`
--


--
-- Table structure for table `report_event`
--

CREATE TABLE `report_event` (
  `event_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event ID',
  `logged_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Logged At',
  `event_type_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Event Type ID',
  `object_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Object ID',
  `subject_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Subject ID',
  `subtype` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Subtype',
  `store_id` smallint unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`event_id`),
  KEY `REPORT_EVENT_EVENT_TYPE_ID` (`event_type_id`),
  KEY `REPORT_EVENT_SUBJECT_ID` (`subject_id`),
  KEY `REPORT_EVENT_OBJECT_ID` (`object_id`),
  KEY `REPORT_EVENT_SUBTYPE` (`subtype`),
  KEY `REPORT_EVENT_STORE_ID` (`store_id`),
  CONSTRAINT `REPORT_EVENT_EVENT_TYPE_ID_REPORT_EVENT_TYPES_EVENT_TYPE_ID` FOREIGN KEY (`event_type_id`) REFERENCES `report_event_types` (`event_type_id`) ON DELETE CASCADE,
  CONSTRAINT `REPORT_EVENT_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Reports Event Table';

--
-- Dumping data for table `report_event`
--


--
-- Table structure for table `report_event_types`
--

CREATE TABLE `report_event_types` (
  `event_type_id` smallint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event Type ID',
  `event_name` varchar(64) NOT NULL COMMENT 'Event Name',
  `customer_login` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Login',
  PRIMARY KEY (`event_type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COMMENT='Reports Event Type Table';

--
-- Dumping data for table `report_event_types`
--

INSERT INTO `report_event_types` VALUES (1,'catalog_product_view',0),(2,'sendfriend_product',0),(3,'catalog_product_compare_add_product',0),(4,'checkout_cart_add_product',0),(5,'wishlist_add_product',0),(6,'wishlist_share',0);

--
-- Table structure for table `report_viewed_product_aggregated_daily`
--

CREATE TABLE `report_viewed_product_aggregated_daily` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `REPORT_VIEWED_PRD_AGGRED_DAILY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_STORE_ID` (`store_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `REPORT_VIEWED_PRD_AGGRED_DAILY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Most Viewed Products Aggregated Daily';

--
-- Dumping data for table `report_viewed_product_aggregated_daily`
--


--
-- Table structure for table `report_viewed_product_aggregated_monthly`
--

CREATE TABLE `report_viewed_product_aggregated_monthly` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `REPORT_VIEWED_PRD_AGGRED_MONTHLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `REPORT_VIEWED_PRD_AGGRED_MONTHLY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Most Viewed Products Aggregated Monthly';

--
-- Dumping data for table `report_viewed_product_aggregated_monthly`
--


--
-- Table structure for table `report_viewed_product_aggregated_yearly`
--

CREATE TABLE `report_viewed_product_aggregated_yearly` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `REPORT_VIEWED_PRD_AGGRED_YEARLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_STORE_ID` (`store_id`),
  KEY `REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `REPORT_VIEWED_PRD_AGGRED_YEARLY_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Most Viewed Products Aggregated Yearly';

--
-- Dumping data for table `report_viewed_product_aggregated_yearly`
--


--
-- Table structure for table `report_viewed_product_index`
--

CREATE TABLE `report_viewed_product_index` (
  `index_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Index ID',
  `visitor_id` int unsigned DEFAULT NULL COMMENT 'Visitor ID',
  `customer_id` int unsigned DEFAULT NULL COMMENT 'Customer ID',
  `product_id` int unsigned NOT NULL COMMENT 'Product ID',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `added_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `REPORT_VIEWED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `REPORT_VIEWED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `REPORT_VIEWED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `REPORT_VIEWED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `REPORT_VIEWED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`),
  CONSTRAINT `REPORT_VIEWED_PRD_IDX_CSTR_ID_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `REPORT_VIEWED_PRD_IDX_PRD_ID_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `REPORT_VIEWED_PRODUCT_INDEX_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb3 COMMENT='Reports Viewed Product Index Table';

--
-- Dumping data for table `report_viewed_product_index`
--

INSERT INTO `report_viewed_product_index` VALUES (1,NULL,NULL,10721,1,'2025-04-29 15:54:13'),(2,NULL,NULL,11095,1,'2025-04-29 16:08:59'),(3,NULL,NULL,11445,1,'2025-04-30 08:07:14'),(4,NULL,NULL,9811,1,'2025-04-30 14:16:48'),(5,NULL,NULL,9261,1,'2025-05-02 12:43:33'),(6,NULL,NULL,6862,1,'2025-05-02 12:51:42'),(7,NULL,NULL,8305,1,'2025-05-05 08:51:24'),(8,NULL,NULL,11335,1,'2025-05-05 09:29:56'),(9,NULL,NULL,6780,1,'2025-05-06 08:15:56'),(10,NULL,NULL,6780,1,'2025-05-06 08:55:20'),(11,NULL,NULL,5760,1,'2025-05-06 08:55:33'),(12,NULL,NULL,5760,1,'2025-05-06 08:58:19'),(13,NULL,NULL,10719,1,'2025-05-06 09:48:03'),(14,NULL,NULL,10721,1,'2025-05-06 09:48:10');

--
-- Table structure for table `reporting_counts`
--

CREATE TABLE `reporting_counts` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `type` varchar(255) DEFAULT NULL COMMENT 'Item Reported',
  `count` int unsigned DEFAULT NULL COMMENT 'Count Value',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Reporting for all count related events generated via the cron job';

--
-- Dumping data for table `reporting_counts`
--


--
-- Table structure for table `reporting_module_status`
--

CREATE TABLE `reporting_module_status` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Module ID',
  `name` varchar(255) DEFAULT NULL COMMENT 'Module Name',
  `active` varchar(255) DEFAULT NULL COMMENT 'Module Active Status',
  `setup_version` varchar(255) DEFAULT NULL COMMENT 'Module Version',
  `state` varchar(255) DEFAULT NULL COMMENT 'Module State',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Module Status Table';

--
-- Dumping data for table `reporting_module_status`
--


--
-- Table structure for table `reporting_orders`
--

CREATE TABLE `reporting_orders` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `customer_id` int unsigned DEFAULT NULL COMMENT 'Customer ID',
  `total` decimal(20,4) unsigned DEFAULT NULL,
  `total_base` decimal(20,4) unsigned DEFAULT NULL,
  `item_count` int unsigned NOT NULL COMMENT 'Line Item Count',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Reporting for all orders';

--
-- Dumping data for table `reporting_orders`
--


--
-- Table structure for table `reporting_system_updates`
--

CREATE TABLE `reporting_system_updates` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `type` varchar(255) DEFAULT NULL COMMENT 'Update Type',
  `action` varchar(255) DEFAULT NULL COMMENT 'Action Performed',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Reporting for system updates';

--
-- Dumping data for table `reporting_system_updates`
--


--
-- Table structure for table `reporting_users`
--

CREATE TABLE `reporting_users` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `type` varchar(255) DEFAULT NULL COMMENT 'User Type',
  `action` varchar(255) DEFAULT NULL COMMENT 'Action Performed',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Reporting for user actions';

--
-- Dumping data for table `reporting_users`
--


--
-- Table structure for table `review`
--

CREATE TABLE `review` (
  `review_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Review create date',
  `entity_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `entity_pk_value` int unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `status_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Status code',
  PRIMARY KEY (`review_id`),
  KEY `REVIEW_ENTITY_ID` (`entity_id`),
  KEY `REVIEW_STATUS_ID` (`status_id`),
  KEY `REVIEW_ENTITY_PK_VALUE` (`entity_pk_value`),
  CONSTRAINT `REVIEW_ENTITY_ID_REVIEW_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `review_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `REVIEW_STATUS_ID_REVIEW_STATUS_STATUS_ID` FOREIGN KEY (`status_id`) REFERENCES `review_status` (`status_id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb3 COMMENT='Review base information';

--
-- Dumping data for table `review`
--

INSERT INTO `review` VALUES (17,'2025-02-10 13:00:57',1,7915,1),(18,'2025-02-25 11:19:29',1,11246,2);

--
-- Table structure for table `review_detail`
--

CREATE TABLE `review_detail` (
  `detail_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review detail ID',
  `review_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'Review ID',
  `store_id` smallint unsigned DEFAULT '0' COMMENT 'Store ID',
  `title` varchar(255) NOT NULL COMMENT 'Title',
  `detail` text NOT NULL COMMENT 'Detail description',
  `nickname` varchar(128) NOT NULL COMMENT 'User nickname',
  `customer_id` int unsigned DEFAULT NULL COMMENT 'Customer ID',
  PRIMARY KEY (`detail_id`),
  KEY `REVIEW_DETAIL_REVIEW_ID` (`review_id`),
  KEY `REVIEW_DETAIL_STORE_ID` (`store_id`),
  KEY `REVIEW_DETAIL_CUSTOMER_ID` (`customer_id`),
  CONSTRAINT `REVIEW_DETAIL_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL,
  CONSTRAINT `REVIEW_DETAIL_REVIEW_ID_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE,
  CONSTRAINT `REVIEW_DETAIL_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb3 COMMENT='Review detail information';

--
-- Dumping data for table `review_detail`
--

INSERT INTO `review_detail` VALUES (17,17,1,'Good','Gooed','Good',NULL),(18,18,1,'test','test','adeeba',NULL);

--
-- Table structure for table `review_entity`
--

CREATE TABLE `review_entity` (
  `entity_id` smallint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review entity ID',
  `entity_code` varchar(32) NOT NULL COMMENT 'Review entity code',
  PRIMARY KEY (`entity_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COMMENT='Review entities';

--
-- Dumping data for table `review_entity`
--

INSERT INTO `review_entity` VALUES (1,'product'),(2,'customer'),(3,'category');

--
-- Table structure for table `review_entity_summary`
--

CREATE TABLE `review_entity_summary` (
  `primary_id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Summary review entity ID',
  `entity_pk_value` bigint NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `entity_type` smallint NOT NULL DEFAULT '0' COMMENT 'Entity type ID',
  `reviews_count` smallint NOT NULL DEFAULT '0' COMMENT 'Qty of reviews',
  `rating_summary` smallint NOT NULL DEFAULT '0' COMMENT 'Summarized rating',
  `store_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  PRIMARY KEY (`primary_id`),
  UNIQUE KEY `REVIEW_ENTITY_SUMMARY_ENTITY_PK_VALUE_STORE_ID_ENTITY_TYPE` (`entity_pk_value`,`store_id`,`entity_type`),
  KEY `REVIEW_ENTITY_SUMMARY_STORE_ID` (`store_id`),
  KEY `REVIEW_ENTITY_SUMMARY_ENTITY_TYPE_ENTITY_PK_VALUE_STORE_ID` (`entity_type`,`entity_pk_value`,`store_id`),
  CONSTRAINT `REVIEW_ENTITY_SUMMARY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb3 COMMENT='Review aggregates';

--
-- Dumping data for table `review_entity_summary`
--

INSERT INTO `review_entity_summary` VALUES (14,7915,1,1,100,1),(15,7915,1,0,0,2),(16,7915,1,0,0,3),(17,7915,1,0,0,4),(18,7915,1,0,0,5),(19,7915,1,0,0,6),(20,7915,1,1,100,0),(21,11246,1,0,0,1),(22,11246,1,0,0,2),(23,11246,1,0,0,3),(24,11246,1,0,0,4),(25,11246,1,0,0,5),(26,11246,1,0,0,6);

--
-- Table structure for table `review_status`
--

CREATE TABLE `review_status` (
  `status_id` smallint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Status ID',
  `status_code` varchar(32) NOT NULL COMMENT 'Status code',
  PRIMARY KEY (`status_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb3 COMMENT='Review statuses';

--
-- Dumping data for table `review_status`
--

INSERT INTO `review_status` VALUES (1,'Approved'),(2,'Pending'),(3,'Not Approved');

--
-- Table structure for table `review_store`
--

CREATE TABLE `review_store` (
  `review_id` bigint unsigned NOT NULL COMMENT 'Review ID',
  `store_id` smallint unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`review_id`,`store_id`),
  KEY `REVIEW_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `REVIEW_STORE_REVIEW_ID_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `review` (`review_id`) ON DELETE CASCADE,
  CONSTRAINT `REVIEW_STORE_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Review Store';

--
-- Dumping data for table `review_store`
--

INSERT INTO `review_store` VALUES (17,0),(18,0),(17,1),(18,1);

--
-- Table structure for table `sales_bestsellers_aggregated_daily`
--

CREATE TABLE `sales_bestsellers_aggregated_daily` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_BESTSELLERS_AGGREGATED_DAILY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID` (`store_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Bestsellers Aggregated Daily';

--
-- Dumping data for table `sales_bestsellers_aggregated_daily`
--


--
-- Table structure for table `sales_bestsellers_aggregated_monthly`
--

CREATE TABLE `sales_bestsellers_aggregated_monthly` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_BESTSELLERS_AGGREGATED_MONTHLY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Bestsellers Aggregated Monthly';

--
-- Dumping data for table `sales_bestsellers_aggregated_monthly`
--


--
-- Table structure for table `sales_bestsellers_aggregated_yearly`
--

CREATE TABLE `sales_bestsellers_aggregated_yearly` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_BESTSELLERS_AGGREGATED_YEARLY_PERIOD_STORE_ID_PRODUCT_ID` (`period`,`store_id`,`product_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID` (`store_id`),
  KEY `SALES_BESTSELLERS_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Bestsellers Aggregated Yearly';

--
-- Dumping data for table `sales_bestsellers_aggregated_yearly`
--


--
-- Table structure for table `sales_creditmemo`
--

CREATE TABLE `sales_creditmemo` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',
  `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `store_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `base_adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',
  `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
  `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',
  `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `store_to_base_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `base_adjustment` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment',
  `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `adjustment` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',
  `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',
  `order_id` int unsigned NOT NULL COMMENT 'Order ID',
  `email_sent` smallint unsigned DEFAULT NULL COMMENT 'Email Sent',
  `send_email` smallint unsigned DEFAULT NULL COMMENT 'Send Email',
  `creditmemo_status` int DEFAULT NULL COMMENT 'Creditmemo Status',
  `state` int DEFAULT NULL COMMENT 'State',
  `shipping_address_id` int DEFAULT NULL COMMENT 'Shipping Address ID',
  `billing_address_id` int DEFAULT NULL COMMENT 'Billing Address ID',
  `invoice_id` int DEFAULT NULL COMMENT 'Invoice ID',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `transaction_id` varchar(255) DEFAULT NULL COMMENT 'Transaction ID',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',
  `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  `mollie_payment_fee` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `mollie_payment_fee_tax` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `base_mollie_payment_fee` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `base_mollie_payment_fee_tax` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_CREDITMEMO_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_CREDITMEMO_STORE_ID` (`store_id`),
  KEY `SALES_CREDITMEMO_ORDER_ID` (`order_id`),
  KEY `SALES_CREDITMEMO_CREDITMEMO_STATUS` (`creditmemo_status`),
  KEY `SALES_CREDITMEMO_STATE` (`state`),
  KEY `SALES_CREDITMEMO_CREATED_AT` (`created_at`),
  KEY `SALES_CREDITMEMO_UPDATED_AT` (`updated_at`),
  KEY `SALES_CREDITMEMO_SEND_EMAIL` (`send_email`),
  KEY `SALES_CREDITMEMO_EMAIL_SENT` (`email_sent`),
  CONSTRAINT `SALES_CREDITMEMO_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `SALES_CREDITMEMO_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Creditmemo';

--
-- Dumping data for table `sales_creditmemo`
--


--
-- Table structure for table `sales_creditmemo_comment`
--

CREATE TABLE `sales_creditmemo_comment` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `is_customer_notified` int DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_CREDITMEMO_COMMENT_CREATED_AT` (`created_at`),
  KEY `SALES_CREDITMEMO_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `SALES_CREDITMEMO_COMMENT_PARENT_ID_SALES_CREDITMEMO_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_creditmemo` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Creditmemo Comment';

--
-- Dumping data for table `sales_creditmemo_comment`
--


--
-- Table structure for table `sales_creditmemo_grid`
--

CREATE TABLE `sales_creditmemo_grid` (
  `entity_id` int unsigned NOT NULL COMMENT 'Entity ID',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `order_id` int unsigned NOT NULL COMMENT 'Order ID',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment ID',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `state` int DEFAULT NULL COMMENT 'Status',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `order_status` varchar(32) DEFAULT NULL COMMENT 'Order Status',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `customer_name` varchar(128) NOT NULL COMMENT 'Customer Name',
  `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` smallint DEFAULT NULL COMMENT 'Customer Group ID',
  `payment_method` varchar(32) DEFAULT NULL COMMENT 'Payment Method',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(20,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',
  `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',
  `order_base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Order Grand Total',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_CREDITMEMO_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `SALES_CREDITMEMO_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_CREDITMEMO_GRID_UPDATED_AT` (`updated_at`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `SALES_CREDITMEMO_GRID_STATE` (`state`),
  KEY `SALES_CREDITMEMO_GRID_BILLING_NAME` (`billing_name`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_STATUS` (`order_status`),
  KEY `SALES_CREDITMEMO_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `SALES_CREDITMEMO_GRID_STORE_ID` (`store_id`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_BASE_GRAND_TOTAL` (`order_base_grand_total`),
  KEY `SALES_CREDITMEMO_GRID_ORDER_ID` (`order_id`),
  FULLTEXT KEY `FTI_32B7BA885941A8254EE84AE650ABDC86` (`increment_id`,`order_increment_id`,`billing_name`,`billing_address`,`shipping_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Creditmemo Grid';

--
-- Dumping data for table `sales_creditmemo_grid`
--


--
-- Table structure for table `sales_creditmemo_item`
--

CREATE TABLE `sales_creditmemo_item` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `base_price` decimal(20,4) DEFAULT NULL COMMENT 'Base Price',
  `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',
  `base_row_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total',
  `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',
  `row_total` decimal(20,4) DEFAULT NULL COMMENT 'Row Total',
  `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `base_price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `base_cost` decimal(20,4) DEFAULT NULL COMMENT 'Base Cost',
  `price` decimal(20,4) DEFAULT NULL COMMENT 'Price',
  `base_row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `product_id` int DEFAULT NULL COMMENT 'Product ID',
  `order_item_id` int DEFAULT NULL COMMENT 'Order Item ID',
  `additional_data` text COMMENT 'Additional Data',
  `description` text COMMENT 'Description',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `tax_ratio` text COMMENT 'Ratio of tax in the creditmemo item over tax of the order item',
  `weee_tax_applied` text COMMENT 'Weee Tax Applied',
  `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',
  `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',
  `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',
  `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',
  `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',
  `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',
  `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',
  `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_CREDITMEMO_ITEM_PARENT_ID` (`parent_id`),
  CONSTRAINT `SALES_CREDITMEMO_ITEM_PARENT_ID_SALES_CREDITMEMO_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_creditmemo` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Creditmemo Item';

--
-- Dumping data for table `sales_creditmemo_item`
--


--
-- Table structure for table `sales_data_exporter_order_statuses`
--

CREATE TABLE `sales_data_exporter_order_statuses` (
  `status` varchar(255) NOT NULL COMMENT 'status',
  `feed_data` mediumtext NOT NULL COMMENT 'Feed Data',
  `modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modified At',
  PRIMARY KEY (`status`),
  KEY `SALES_DATA_EXPORTER_ORDER_STATUSES_MODIFIED_AT` (`modified_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Order Statuses Feed Storage';

--
-- Dumping data for table `sales_data_exporter_order_statuses`
--

INSERT INTO `sales_data_exporter_order_statuses` VALUES ('canceled','{\"status\":\"canceled\",\"label\":\"Canceled\"}','2025-05-05 14:58:46'),('closed','{\"status\":\"closed\",\"label\":\"Closed\"}','2025-05-05 14:58:46'),('complete','{\"status\":\"complete\",\"label\":\"Complete\"}','2025-05-05 14:58:46'),('fraud','{\"status\":\"fraud\",\"label\":\"Suspected Fraud\"}','2025-05-05 14:58:46'),('holded','{\"status\":\"holded\",\"label\":\"On Hold\"}','2025-05-05 14:58:46'),('payment_review','{\"status\":\"payment_review\",\"label\":\"Payment Review\"}','2025-05-05 14:58:46'),('paypal_canceled_reversal','{\"status\":\"paypal_canceled_reversal\",\"label\":\"PayPal Canceled Reversal\"}','2025-05-05 14:58:46'),('paypal_reversed','{\"status\":\"paypal_reversed\",\"label\":\"PayPal Reversed\"}','2025-05-05 14:58:46'),('pending','{\"status\":\"pending\",\"label\":\"Pending\"}','2025-05-05 14:58:46'),('pending_payment','{\"status\":\"pending_payment\",\"label\":\"Pending Payment\"}','2025-05-05 14:58:46'),('pending_paypal','{\"status\":\"pending_paypal\",\"label\":\"Pending PayPal\"}','2025-05-05 14:58:46'),('processing','{\"status\":\"processing\",\"label\":\"Processing\"}','2025-05-05 14:58:46');

--
-- Table structure for table `sales_data_exporter_order_statuses_index_batches`
--

CREATE TABLE `sales_data_exporter_order_statuses_index_batches` (
  `batch_number` int NOT NULL COMMENT 'Batch Number',
  `status` varchar(32) NOT NULL COMMENT 'Status',
  PRIMARY KEY (`batch_number`,`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='sales_data_exporter_order_statuses_index_batches';

--
-- Dumping data for table `sales_data_exporter_order_statuses_index_batches`
--

INSERT INTO `sales_data_exporter_order_statuses_index_batches` VALUES (1,'canceled'),(1,'closed'),(1,'complete'),(1,'fraud'),(1,'holded'),(1,'payment_review'),(1,'paypal_canceled_reversal'),(1,'paypal_reversed'),(1,'pending'),(1,'pending_payment'),(1,'pending_paypal'),(1,'processing');

--
-- Table structure for table `sales_data_exporter_order_statuses_index_sequence`
--

CREATE TABLE `sales_data_exporter_order_statuses_index_sequence` (
  `i` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID',
  PRIMARY KEY (`i`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COMMENT='sales_data_exporter_order_statuses_index_sequence';

--
-- Dumping data for table `sales_data_exporter_order_statuses_index_sequence`
--

INSERT INTO `sales_data_exporter_order_statuses_index_sequence` VALUES (1),(2);

--
-- Table structure for table `sales_data_exporter_orders`
--

CREATE TABLE `sales_data_exporter_orders` (
  `id` int unsigned NOT NULL COMMENT 'ID',
  `mode` varchar(255) NOT NULL COMMENT 'Order Payment Mode',
  `feed_data` mediumtext NOT NULL COMMENT 'Feed Data',
  `modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modified At',
  PRIMARY KEY (`id`),
  KEY `SALES_DATA_EXPORTER_ORDERS_MODIFIED_AT` (`modified_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Orders Feed Storage';

--
-- Dumping data for table `sales_data_exporter_orders`
--


--
-- Table structure for table `sales_data_exporter_orders_index_batches`
--

CREATE TABLE `sales_data_exporter_orders_index_batches` (
  `batch_number` int NOT NULL COMMENT 'Batch Number',
  `entity_id` int unsigned NOT NULL COMMENT 'Entity Id',
  PRIMARY KEY (`batch_number`,`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='sales_data_exporter_orders_index_batches';

--
-- Dumping data for table `sales_data_exporter_orders_index_batches`
--

INSERT INTO `sales_data_exporter_orders_index_batches` VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6);

--
-- Table structure for table `sales_data_exporter_orders_index_sequence`
--

CREATE TABLE `sales_data_exporter_orders_index_sequence` (
  `i` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Auto Increment ID',
  PRIMARY KEY (`i`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COMMENT='sales_data_exporter_orders_index_sequence';

--
-- Dumping data for table `sales_data_exporter_orders_index_sequence`
--

INSERT INTO `sales_data_exporter_orders_index_sequence` VALUES (1),(2);

--
-- Table structure for table `sales_invoice`
--

CREATE TABLE `sales_invoice` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',
  `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `store_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
  `store_to_base_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',
  `billing_address_id` int DEFAULT NULL COMMENT 'Billing Address ID',
  `is_used_for_refund` smallint unsigned DEFAULT NULL COMMENT 'Is Used For Refund',
  `order_id` int unsigned NOT NULL COMMENT 'Order ID',
  `email_sent` smallint unsigned DEFAULT NULL COMMENT 'Email Sent',
  `send_email` smallint unsigned DEFAULT NULL COMMENT 'Send Email',
  `can_void_flag` smallint unsigned DEFAULT NULL COMMENT 'Can Void Flag',
  `state` int DEFAULT NULL COMMENT 'State',
  `shipping_address_id` int DEFAULT NULL COMMENT 'Shipping Address ID',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `transaction_id` varchar(255) DEFAULT NULL COMMENT 'Transaction ID',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',
  `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `base_total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Refunded',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  `mollie_payment_fee` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `mollie_payment_fee_tax` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `base_mollie_payment_fee` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `base_mollie_payment_fee_tax` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_INVOICE_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_INVOICE_STORE_ID` (`store_id`),
  KEY `SALES_INVOICE_GRAND_TOTAL` (`grand_total`),
  KEY `SALES_INVOICE_ORDER_ID` (`order_id`),
  KEY `SALES_INVOICE_STATE` (`state`),
  KEY `SALES_INVOICE_CREATED_AT` (`created_at`),
  KEY `SALES_INVOICE_UPDATED_AT` (`updated_at`),
  KEY `SALES_INVOICE_SEND_EMAIL` (`send_email`),
  KEY `SALES_INVOICE_EMAIL_SENT` (`email_sent`),
  CONSTRAINT `SALES_INVOICE_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `SALES_INVOICE_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Invoice';

--
-- Dumping data for table `sales_invoice`
--


--
-- Table structure for table `sales_invoice_comment`
--

CREATE TABLE `sales_invoice_comment` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `is_customer_notified` smallint unsigned DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_INVOICE_COMMENT_CREATED_AT` (`created_at`),
  KEY `SALES_INVOICE_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `SALES_INVOICE_COMMENT_PARENT_ID_SALES_INVOICE_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_invoice` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Invoice Comment';

--
-- Dumping data for table `sales_invoice_comment`
--


--
-- Table structure for table `sales_invoice_grid`
--

CREATE TABLE `sales_invoice_grid` (
  `entity_id` int unsigned NOT NULL COMMENT 'Entity ID',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `state` int DEFAULT NULL COMMENT 'State',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `order_id` int unsigned NOT NULL COMMENT 'Order ID',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment ID',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `customer_name` varchar(255) DEFAULT NULL COMMENT 'Customer Name',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` int DEFAULT NULL,
  `payment_method` varchar(128) DEFAULT NULL COMMENT 'Payment Method',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(20,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_INVOICE_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_INVOICE_GRID_STORE_ID` (`store_id`),
  KEY `SALES_INVOICE_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `SALES_INVOICE_GRID_ORDER_ID` (`order_id`),
  KEY `SALES_INVOICE_GRID_STATE` (`state`),
  KEY `SALES_INVOICE_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `SALES_INVOICE_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_INVOICE_GRID_UPDATED_AT` (`updated_at`),
  KEY `SALES_INVOICE_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `SALES_INVOICE_GRID_BILLING_NAME` (`billing_name`),
  KEY `SALES_INVOICE_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  FULLTEXT KEY `FTI_95D9C924DD6A8734EB8B5D01D60F90DE` (`increment_id`,`order_increment_id`,`billing_name`,`billing_address`,`shipping_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Invoice Grid';

--
-- Dumping data for table `sales_invoice_grid`
--


--
-- Table structure for table `sales_invoice_item`
--

CREATE TABLE `sales_invoice_item` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `base_price` decimal(20,4) DEFAULT NULL COMMENT 'Base Price',
  `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',
  `base_row_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total',
  `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',
  `row_total` decimal(20,4) DEFAULT NULL COMMENT 'Row Total',
  `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `base_price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `base_cost` decimal(20,4) DEFAULT NULL COMMENT 'Base Cost',
  `price` decimal(20,4) DEFAULT NULL COMMENT 'Price',
  `base_row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `product_id` int DEFAULT NULL COMMENT 'Product ID',
  `order_item_id` int DEFAULT NULL COMMENT 'Order Item ID',
  `additional_data` text COMMENT 'Additional Data',
  `description` text COMMENT 'Description',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `tax_ratio` text COMMENT 'Ratio of tax invoiced over tax of the order item',
  `weee_tax_applied` text COMMENT 'Weee Tax Applied',
  `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',
  `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',
  `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',
  `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',
  `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',
  `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',
  `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',
  `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_INVOICE_ITEM_PARENT_ID` (`parent_id`),
  CONSTRAINT `SALES_INVOICE_ITEM_PARENT_ID_SALES_INVOICE_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_invoice` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Invoice Item';

--
-- Dumping data for table `sales_invoice_item`
--


--
-- Table structure for table `sales_invoiced_aggregated`
--

CREATE TABLE `sales_invoiced_aggregated` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `orders_count` int NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `orders_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Orders Invoiced',
  `invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced',
  `invoiced_captured` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced Captured',
  `invoiced_not_captured` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced Not Captured',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_INVOICED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_INVOICED_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_INVOICED_AGGREGATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Invoiced Aggregated';

--
-- Dumping data for table `sales_invoiced_aggregated`
--


--
-- Table structure for table `sales_invoiced_aggregated_order`
--

CREATE TABLE `sales_invoiced_aggregated_order` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `orders_count` int NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `orders_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Orders Invoiced',
  `invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced',
  `invoiced_captured` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced Captured',
  `invoiced_not_captured` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced Not Captured',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_INVOICED_AGGREGATED_ORDER_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_INVOICED_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_INVOICED_AGGREGATED_ORDER_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Invoiced Aggregated Order';

--
-- Dumping data for table `sales_invoiced_aggregated_order`
--


--
-- Table structure for table `sales_order`
--

CREATE TABLE `sales_order` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `state` varchar(32) DEFAULT NULL COMMENT 'State',
  `status` varchar(32) DEFAULT NULL COMMENT 'Status',
  `coupon_code` varchar(255) DEFAULT NULL COMMENT 'Coupon Code',
  `protect_code` varchar(255) DEFAULT NULL COMMENT 'Protect Code',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `is_virtual` smallint unsigned DEFAULT NULL COMMENT 'Is Virtual',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `customer_id` int unsigned DEFAULT NULL COMMENT 'Customer ID',
  `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `base_discount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Canceled',
  `base_discount_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Invoiced',
  `base_discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Refunded',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `base_shipping_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Canceled',
  `base_shipping_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Invoiced',
  `base_shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Refunded',
  `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `base_shipping_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Refunded',
  `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `base_subtotal_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Canceled',
  `base_subtotal_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Invoiced',
  `base_subtotal_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Refunded',
  `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `base_tax_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Canceled',
  `base_tax_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Invoiced',
  `base_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Refunded',
  `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `base_total_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Canceled',
  `base_total_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Invoiced',
  `base_total_invoiced_cost` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Invoiced Cost',
  `base_total_offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Offline Refunded',
  `base_total_online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Online Refunded',
  `base_total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Paid',
  `base_total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Base Total Qty Ordered',
  `base_total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Refunded',
  `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',
  `discount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Discount Canceled',
  `discount_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Invoiced',
  `discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Refunded',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `shipping_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Canceled',
  `shipping_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Invoiced',
  `shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Refunded',
  `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `shipping_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Refunded',
  `store_to_base_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `store_to_order_rate` decimal(12,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `subtotal_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Canceled',
  `subtotal_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Invoiced',
  `subtotal_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Refunded',
  `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',
  `tax_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Tax Canceled',
  `tax_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Tax Invoiced',
  `tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Tax Refunded',
  `total_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Total Canceled',
  `total_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Total Invoiced',
  `total_offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Offline Refunded',
  `total_online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Online Refunded',
  `total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Total Paid',
  `total_qty_ordered` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty Ordered',
  `total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Refunded',
  `can_ship_partially` smallint unsigned DEFAULT NULL COMMENT 'Can Ship Partially',
  `can_ship_partially_item` smallint unsigned DEFAULT NULL COMMENT 'Can Ship Partially Item',
  `customer_is_guest` smallint unsigned DEFAULT NULL COMMENT 'Customer Is Guest',
  `customer_note_notify` smallint unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  `billing_address_id` int DEFAULT NULL COMMENT 'Billing Address ID',
  `customer_group_id` int DEFAULT NULL,
  `edit_increment` int DEFAULT NULL COMMENT 'Edit Increment',
  `email_sent` smallint unsigned DEFAULT NULL COMMENT 'Email Sent',
  `send_email` smallint unsigned DEFAULT NULL COMMENT 'Send Email',
  `forced_shipment_with_invoice` smallint unsigned DEFAULT NULL COMMENT 'Forced Do Shipment With Invoice',
  `payment_auth_expiration` int DEFAULT NULL COMMENT 'Payment Authorization Expiration',
  `quote_address_id` int DEFAULT NULL COMMENT 'Quote Address ID',
  `quote_id` int DEFAULT NULL COMMENT 'Quote ID',
  `shipping_address_id` int DEFAULT NULL COMMENT 'Shipping Address ID',
  `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',
  `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',
  `base_adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',
  `base_adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',
  `base_shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Amount',
  `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
  `base_total_due` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Due',
  `payment_authorization_amount` decimal(20,4) DEFAULT NULL COMMENT 'Payment Authorization Amount',
  `shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Amount',
  `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `total_due` decimal(20,4) DEFAULT NULL COMMENT 'Total Due',
  `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',
  `customer_dob` datetime DEFAULT NULL COMMENT 'Customer Dob',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `applied_rule_ids` varchar(128) DEFAULT NULL COMMENT 'Applied Rule Ids',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',
  `customer_firstname` varchar(128) DEFAULT NULL COMMENT 'Customer Firstname',
  `customer_lastname` varchar(128) DEFAULT NULL COMMENT 'Customer Lastname',
  `customer_middlename` varchar(128) DEFAULT NULL COMMENT 'Customer Middlename',
  `customer_prefix` varchar(32) DEFAULT NULL COMMENT 'Customer Prefix',
  `customer_suffix` varchar(32) DEFAULT NULL COMMENT 'Customer Suffix',
  `customer_taxvat` varchar(32) DEFAULT NULL COMMENT 'Customer Taxvat',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `ext_customer_id` varchar(32) DEFAULT NULL COMMENT 'Ext Customer ID',
  `ext_order_id` varchar(32) DEFAULT NULL COMMENT 'Ext Order ID',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `hold_before_state` varchar(32) DEFAULT NULL COMMENT 'Hold Before State',
  `hold_before_status` varchar(32) DEFAULT NULL COMMENT 'Hold Before Status',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `original_increment_id` varchar(50) DEFAULT NULL COMMENT 'Original Increment ID',
  `relation_child_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child ID',
  `relation_child_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Child Real ID',
  `relation_parent_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent ID',
  `relation_parent_real_id` varchar(32) DEFAULT NULL COMMENT 'Relation Parent Real ID',
  `remote_ip` varchar(45) DEFAULT NULL COMMENT 'Remote Ip',
  `shipping_method` varchar(120) DEFAULT NULL,
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `x_forwarded_for` varchar(255) DEFAULT NULL COMMENT 'X Forwarded For',
  `customer_note` text COMMENT 'Customer Note',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `total_item_count` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Total Item Count',
  `customer_gender` int DEFAULT NULL COMMENT 'Customer Gender',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',
  `discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',
  `base_discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',
  `discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',
  `base_discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Refunded',
  `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `coupon_rule_name` varchar(255) DEFAULT NULL COMMENT 'Coupon Sales Rule Name',
  `gift_message_id` int DEFAULT NULL COMMENT 'Gift Message ID',
  `paypal_ipn_customer_notified` int DEFAULT '0' COMMENT 'Paypal Ipn Customer Notified',
  `dispute_status` varchar(45) DEFAULT NULL COMMENT 'Braintree Dispute Status',
  `mp_smtp_email_marketing_synced` smallint DEFAULT '0' COMMENT 'Mp SMTP Email Marketing synced',
  `mp_smtp_email_marketing_order_created` smallint DEFAULT '0' COMMENT 'Mp SMTP Email Marketing order created',
  `delivery_method` varchar(255) DEFAULT NULL COMMENT 'Delivery Method',
  `mollie_transaction_id` varchar(255) DEFAULT NULL COMMENT 'Mollie Transaction Id',
  `mollie_payment_fee` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `mollie_payment_fee_tax` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `base_mollie_payment_fee` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  `base_mollie_payment_fee_tax` decimal(12,4) DEFAULT '0.0000' COMMENT 'Mollie Payment Fee',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_ORDER_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_ORDER_STATUS` (`status`),
  KEY `SALES_ORDER_STATE` (`state`),
  KEY `SALES_ORDER_STORE_ID` (`store_id`),
  KEY `SALES_ORDER_CREATED_AT` (`created_at`),
  KEY `SALES_ORDER_CUSTOMER_ID` (`customer_id`),
  KEY `SALES_ORDER_EXT_ORDER_ID` (`ext_order_id`),
  KEY `SALES_ORDER_QUOTE_ID` (`quote_id`),
  KEY `SALES_ORDER_UPDATED_AT` (`updated_at`),
  KEY `SALES_ORDER_SEND_EMAIL` (`send_email`),
  KEY `SALES_ORDER_EMAIL_SENT` (`email_sent`),
  KEY `SALES_ORDER_STORE_ID_STATE_CREATED_AT` (`store_id`,`state`,`created_at`),
  KEY `SALES_ORDER_MOLLIE_TRANSACTION_ID` (`mollie_transaction_id`),
  CONSTRAINT `SALES_ORDER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE SET NULL,
  CONSTRAINT `SALES_ORDER_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COMMENT='sales_order';

--
-- Dumping data for table `sales_order`
--

INSERT INTO `sales_order` VALUES (1,'processing','processing',NULL,'da79059d728f8a3367c63d97942d2419','Flat Rate - Fixed',0,1,NULL,0.0000,NULL,NULL,NULL,865.0000,5.0000,NULL,NULL,NULL,0.0000,NULL,860.0000,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,1.0000,1.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,865.0000,5.0000,NULL,NULL,NULL,0.0000,NULL,0.0000,0.0000,860.0000,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.0000,NULL,NULL,NULL,1,0,2,0,NULL,NULL,1,NULL,NULL,NULL,2,1,NULL,NULL,NULL,NULL,0.0000,860.0000,865.0000,NULL,0.0000,860.0000,865.0000,0.0000,NULL,'000000003',NULL,'USD','zohaibmuhammad23@gmail.com','Muhammad ','Zohaib ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',NULL,NULL,'USD',NULL,NULL,NULL,NULL,NULL,'39.37.183.204','flatrate_flatrate','USD','Main Website\nMain Website Store\nDefault Store View',NULL,NULL,'2025-01-07 13:54:08','2025-01-14 09:42:28',1,NULL,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,5.0000,5.0000,NULL,NULL,0,NULL,0,0,NULL,NULL,0.0000,0.0000,0.0000,0.0000),(2,'new','pending',NULL,'3ccf2cbb670a30a624a7465e1672a099','Van Delivery - Shipping Test',0,1,NULL,0.0000,NULL,NULL,NULL,394.9900,45.0000,NULL,NULL,NULL,0.0000,NULL,349.9900,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,1.0000,1.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,394.9900,45.0000,NULL,NULL,NULL,0.0000,NULL,0.0000,0.0000,349.9900,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.0000,NULL,NULL,NULL,1,1,4,0,NULL,NULL,1,NULL,NULL,NULL,6,3,NULL,NULL,NULL,NULL,0.0000,349.9900,394.9900,NULL,0.0000,349.9900,394.9900,0.0000,NULL,'000000004',NULL,'USD','zohaibmuhammad23@gmail.com','sadas','sadsa',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',NULL,NULL,'USD',NULL,NULL,NULL,NULL,NULL,'172.70.111.80','gazco_gazcofire','USD','Main Website\nMain Website Store\nDefault Store View','182.185.158.222',NULL,'2025-01-28 08:41:05','2025-01-28 08:41:05',1,NULL,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,0,NULL,0,0,NULL,NULL,0.0000,0.0000,0.0000,0.0000),(3,'canceled','canceled',NULL,'b5b66c905486964870ec948aae5b3228','Van Delivery - Shipping Test',0,1,NULL,0.0000,0.0000,NULL,NULL,394.9900,45.0000,45.0000,NULL,NULL,0.0000,NULL,349.9900,349.9900,NULL,NULL,0.0000,0.0000,NULL,NULL,1.0000,1.0000,394.9900,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.0000,0.0000,NULL,NULL,394.9900,45.0000,45.0000,NULL,NULL,0.0000,NULL,0.0000,0.0000,349.9900,349.9900,NULL,NULL,0.0000,0.0000,NULL,NULL,394.9900,NULL,NULL,NULL,NULL,1.0000,NULL,NULL,NULL,1,1,6,0,NULL,NULL,1,NULL,NULL,NULL,8,5,NULL,NULL,NULL,NULL,0.0000,349.9900,394.9900,NULL,0.0000,349.9900,394.9900,0.0000,NULL,'000000005',NULL,'USD','zohaibmuhammad23@gmail.com','Test ','zohaib',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',NULL,NULL,'USD',NULL,'4','000000005-1',NULL,NULL,'172.70.230.57','gazco_gazcofire','USD','Main Website\nMain Website Store\nDefault Store View','182.185.158.222',NULL,'2025-01-29 15:40:47','2025-01-29 15:54:41',1,NULL,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,0,NULL,0,0,'banyo_direct',NULL,0.0000,0.0000,0.0000,0.0000),(4,'processing','processing',NULL,'b0bcb926e7abb532d4b4cf25c1f48183','Van Delivery - Shipping Test',0,1,NULL,0.0000,NULL,NULL,NULL,394.9900,45.0000,NULL,NULL,NULL,0.0000,NULL,349.9900,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,1.0000,1.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,394.9900,45.0000,NULL,NULL,NULL,0.0000,NULL,0.0000,0.0000,349.9900,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.0000,NULL,NULL,NULL,1,0,8,0,1,NULL,1,NULL,NULL,NULL,11,7,NULL,NULL,NULL,NULL,0.0000,349.9900,394.9900,NULL,0.0000,349.9900,394.9900,0.0000,NULL,'000000005-1',NULL,'USD','zohaibmuhammad23@gmail.com','Test','zohaib',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'USD',NULL,NULL,'USD','000000005',NULL,NULL,'3','000000005',NULL,'gazco_gazcofire','USD','Main Website\nMain Website Store\nDefault Store View',NULL,NULL,'2025-01-29 15:54:40','2025-01-29 15:57:53',1,0,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,0,NULL,0,0,'banyo_direct',NULL,0.0000,0.0000,0.0000,0.0000),(5,'new','pending',NULL,'a2db44cece2da7fae6ce02d9982d273f','Van Delivery - Gazco',0,1,NULL,0.0000,NULL,NULL,NULL,761.8000,45.0000,NULL,NULL,NULL,0.0000,NULL,716.8000,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,1.0000,1.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,761.8000,45.0000,NULL,NULL,NULL,0.0000,NULL,0.0000,0.0000,716.8000,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.0000,NULL,NULL,NULL,1,1,10,0,NULL,NULL,1,NULL,NULL,NULL,15,9,NULL,NULL,NULL,NULL,0.0000,716.8000,761.8000,NULL,0.0000,716.8000,761.8000,0.0000,NULL,'000000006',NULL,'GBP','zohaibmuhammad23@gmail.com','Test','tEST2',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'GBP',NULL,NULL,'GBP',NULL,NULL,NULL,NULL,NULL,'162.158.155.37','gazco_gazcofire','GBP','Main Website\nMain Website Store\nDefault Store View','39.46.200.39',NULL,'2025-02-12 10:15:49','2025-02-12 10:15:51',1,NULL,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,0,NULL,0,0,NULL,NULL,0.0000,0.0000,0.0000,0.0000),(6,'new','pending',NULL,'c039f74c0c92ecac9b491608db9de90a','Van Delivery - Gazco',0,1,NULL,0.0000,NULL,NULL,NULL,323.4000,45.0000,NULL,NULL,NULL,0.0000,NULL,278.4000,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,1.0000,1.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,323.4000,45.0000,NULL,NULL,NULL,0.0000,NULL,0.0000,0.0000,278.4000,NULL,NULL,NULL,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1.0000,NULL,NULL,NULL,1,1,12,0,NULL,NULL,1,NULL,NULL,NULL,16,11,NULL,NULL,NULL,NULL,0.0000,278.4000,323.4000,NULL,0.0000,278.4000,323.4000,0.0000,NULL,'000000007',NULL,'GBP','zohaibmuhammad23@gmail.com','dsssssad','asd',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'GBP',NULL,NULL,'GBP',NULL,NULL,NULL,NULL,NULL,'172.70.114.89','gazco_gazcofire','GBP','Main Website\nMain Website Store\nDefault Store View','39.46.200.39',NULL,'2025-02-12 11:43:16','2025-02-12 11:43:18',1,NULL,0.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,0,NULL,0,0,NULL,NULL,0.0000,0.0000,0.0000,0.0000);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_after_insert` AFTER INSERT ON `sales_order` FOR EACH ROW BEGIN
INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_after_update` AFTER UPDATE ON `sales_order` FOR EACH ROW BEGIN
IF (NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`state` <=> OLD.`state`) OR NOT(NEW.`status` <=> OLD.`status`) OR NOT(NEW.`coupon_code` <=> OLD.`coupon_code`) OR NOT(NEW.`protect_code` <=> OLD.`protect_code`) OR NOT(NEW.`shipping_description` <=> OLD.`shipping_description`) OR NOT(NEW.`is_virtual` <=> OLD.`is_virtual`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`customer_id` <=> OLD.`customer_id`) OR NOT(NEW.`base_discount_amount` <=> OLD.`base_discount_amount`) OR NOT(NEW.`base_discount_canceled` <=> OLD.`base_discount_canceled`) OR NOT(NEW.`base_discount_invoiced` <=> OLD.`base_discount_invoiced`) OR NOT(NEW.`base_discount_refunded` <=> OLD.`base_discount_refunded`) OR NOT(NEW.`base_grand_total` <=> OLD.`base_grand_total`) OR NOT(NEW.`base_shipping_amount` <=> OLD.`base_shipping_amount`) OR NOT(NEW.`base_shipping_canceled` <=> OLD.`base_shipping_canceled`) OR NOT(NEW.`base_shipping_invoiced` <=> OLD.`base_shipping_invoiced`) OR NOT(NEW.`base_shipping_refunded` <=> OLD.`base_shipping_refunded`) OR NOT(NEW.`base_shipping_tax_amount` <=> OLD.`base_shipping_tax_amount`) OR NOT(NEW.`base_shipping_tax_refunded` <=> OLD.`base_shipping_tax_refunded`) OR NOT(NEW.`base_subtotal` <=> OLD.`base_subtotal`) OR NOT(NEW.`base_subtotal_canceled` <=> OLD.`base_subtotal_canceled`) OR NOT(NEW.`base_subtotal_invoiced` <=> OLD.`base_subtotal_invoiced`) OR NOT(NEW.`base_subtotal_refunded` <=> OLD.`base_subtotal_refunded`) OR NOT(NEW.`base_tax_amount` <=> OLD.`base_tax_amount`) OR NOT(NEW.`base_tax_canceled` <=> OLD.`base_tax_canceled`) OR NOT(NEW.`base_tax_invoiced` <=> OLD.`base_tax_invoiced`) OR NOT(NEW.`base_tax_refunded` <=> OLD.`base_tax_refunded`) OR NOT(NEW.`base_to_global_rate` <=> OLD.`base_to_global_rate`) OR NOT(NEW.`base_to_order_rate` <=> OLD.`base_to_order_rate`) OR NOT(NEW.`base_total_canceled` <=> OLD.`base_total_canceled`) OR NOT(NEW.`base_total_invoiced` <=> OLD.`base_total_invoiced`) OR NOT(NEW.`base_total_invoiced_cost` <=> OLD.`base_total_invoiced_cost`) OR NOT(NEW.`base_total_offline_refunded` <=> OLD.`base_total_offline_refunded`) OR NOT(NEW.`base_total_online_refunded` <=> OLD.`base_total_online_refunded`) OR NOT(NEW.`base_total_paid` <=> OLD.`base_total_paid`) OR NOT(NEW.`base_total_qty_ordered` <=> OLD.`base_total_qty_ordered`) OR NOT(NEW.`base_total_refunded` <=> OLD.`base_total_refunded`) OR NOT(NEW.`discount_amount` <=> OLD.`discount_amount`) OR NOT(NEW.`discount_canceled` <=> OLD.`discount_canceled`) OR NOT(NEW.`discount_invoiced` <=> OLD.`discount_invoiced`) OR NOT(NEW.`discount_refunded` <=> OLD.`discount_refunded`) OR NOT(NEW.`grand_total` <=> OLD.`grand_total`) OR NOT(NEW.`shipping_amount` <=> OLD.`shipping_amount`) OR NOT(NEW.`shipping_canceled` <=> OLD.`shipping_canceled`) OR NOT(NEW.`shipping_invoiced` <=> OLD.`shipping_invoiced`) OR NOT(NEW.`shipping_refunded` <=> OLD.`shipping_refunded`) OR NOT(NEW.`shipping_tax_amount` <=> OLD.`shipping_tax_amount`) OR NOT(NEW.`shipping_tax_refunded` <=> OLD.`shipping_tax_refunded`) OR NOT(NEW.`store_to_base_rate` <=> OLD.`store_to_base_rate`) OR NOT(NEW.`store_to_order_rate` <=> OLD.`store_to_order_rate`) OR NOT(NEW.`subtotal` <=> OLD.`subtotal`) OR NOT(NEW.`subtotal_canceled` <=> OLD.`subtotal_canceled`) OR NOT(NEW.`subtotal_invoiced` <=> OLD.`subtotal_invoiced`) OR NOT(NEW.`subtotal_refunded` <=> OLD.`subtotal_refunded`) OR NOT(NEW.`tax_amount` <=> OLD.`tax_amount`) OR NOT(NEW.`tax_canceled` <=> OLD.`tax_canceled`) OR NOT(NEW.`tax_invoiced` <=> OLD.`tax_invoiced`) OR NOT(NEW.`tax_refunded` <=> OLD.`tax_refunded`) OR NOT(NEW.`total_canceled` <=> OLD.`total_canceled`) OR NOT(NEW.`total_invoiced` <=> OLD.`total_invoiced`) OR NOT(NEW.`total_offline_refunded` <=> OLD.`total_offline_refunded`) OR NOT(NEW.`total_online_refunded` <=> OLD.`total_online_refunded`) OR NOT(NEW.`total_paid` <=> OLD.`total_paid`) OR NOT(NEW.`total_qty_ordered` <=> OLD.`total_qty_ordered`) OR NOT(NEW.`total_refunded` <=> OLD.`total_refunded`) OR NOT(NEW.`can_ship_partially` <=> OLD.`can_ship_partially`) OR NOT(NEW.`can_ship_partially_item` <=> OLD.`can_ship_partially_item`) OR NOT(NEW.`customer_is_guest` <=> OLD.`customer_is_guest`) OR NOT(NEW.`customer_note_notify` <=> OLD.`customer_note_notify`) OR NOT(NEW.`billing_address_id` <=> OLD.`billing_address_id`) OR NOT(NEW.`customer_group_id` <=> OLD.`customer_group_id`) OR NOT(NEW.`edit_increment` <=> OLD.`edit_increment`) OR NOT(NEW.`email_sent` <=> OLD.`email_sent`) OR NOT(NEW.`send_email` <=> OLD.`send_email`) OR NOT(NEW.`forced_shipment_with_invoice` <=> OLD.`forced_shipment_with_invoice`) OR NOT(NEW.`payment_auth_expiration` <=> OLD.`payment_auth_expiration`) OR NOT(NEW.`quote_address_id` <=> OLD.`quote_address_id`) OR NOT(NEW.`quote_id` <=> OLD.`quote_id`) OR NOT(NEW.`shipping_address_id` <=> OLD.`shipping_address_id`) OR NOT(NEW.`adjustment_negative` <=> OLD.`adjustment_negative`) OR NOT(NEW.`adjustment_positive` <=> OLD.`adjustment_positive`) OR NOT(NEW.`base_adjustment_negative` <=> OLD.`base_adjustment_negative`) OR NOT(NEW.`base_adjustment_positive` <=> OLD.`base_adjustment_positive`) OR NOT(NEW.`base_shipping_discount_amount` <=> OLD.`base_shipping_discount_amount`) OR NOT(NEW.`base_subtotal_incl_tax` <=> OLD.`base_subtotal_incl_tax`) OR NOT(NEW.`base_total_due` <=> OLD.`base_total_due`) OR NOT(NEW.`payment_authorization_amount` <=> OLD.`payment_authorization_amount`) OR NOT(NEW.`shipping_discount_amount` <=> OLD.`shipping_discount_amount`) OR NOT(NEW.`subtotal_incl_tax` <=> OLD.`subtotal_incl_tax`) OR NOT(NEW.`total_due` <=> OLD.`total_due`) OR NOT(NEW.`weight` <=> OLD.`weight`) OR NOT(NEW.`customer_dob` <=> OLD.`customer_dob`) OR NOT(NEW.`increment_id` <=> OLD.`increment_id`) OR NOT(NEW.`applied_rule_ids` <=> OLD.`applied_rule_ids`) OR NOT(NEW.`base_currency_code` <=> OLD.`base_currency_code`) OR NOT(NEW.`customer_email` <=> OLD.`customer_email`) OR NOT(NEW.`customer_firstname` <=> OLD.`customer_firstname`) OR NOT(NEW.`customer_lastname` <=> OLD.`customer_lastname`) OR NOT(NEW.`customer_middlename` <=> OLD.`customer_middlename`) OR NOT(NEW.`customer_prefix` <=> OLD.`customer_prefix`) OR NOT(NEW.`customer_suffix` <=> OLD.`customer_suffix`) OR NOT(NEW.`customer_taxvat` <=> OLD.`customer_taxvat`) OR NOT(NEW.`discount_description` <=> OLD.`discount_description`) OR NOT(NEW.`ext_customer_id` <=> OLD.`ext_customer_id`) OR NOT(NEW.`ext_order_id` <=> OLD.`ext_order_id`) OR NOT(NEW.`global_currency_code` <=> OLD.`global_currency_code`) OR NOT(NEW.`hold_before_state` <=> OLD.`hold_before_state`) OR NOT(NEW.`hold_before_status` <=> OLD.`hold_before_status`) OR NOT(NEW.`order_currency_code` <=> OLD.`order_currency_code`) OR NOT(NEW.`original_increment_id` <=> OLD.`original_increment_id`) OR NOT(NEW.`relation_child_id` <=> OLD.`relation_child_id`) OR NOT(NEW.`relation_child_real_id` <=> OLD.`relation_child_real_id`) OR NOT(NEW.`relation_parent_id` <=> OLD.`relation_parent_id`) OR NOT(NEW.`relation_parent_real_id` <=> OLD.`relation_parent_real_id`) OR NOT(NEW.`remote_ip` <=> OLD.`remote_ip`) OR NOT(NEW.`shipping_method` <=> OLD.`shipping_method`) OR NOT(NEW.`store_currency_code` <=> OLD.`store_currency_code`) OR NOT(NEW.`store_name` <=> OLD.`store_name`) OR NOT(NEW.`x_forwarded_for` <=> OLD.`x_forwarded_for`) OR NOT(NEW.`customer_note` <=> OLD.`customer_note`) OR NOT(NEW.`created_at` <=> OLD.`created_at`) OR NOT(NEW.`total_item_count` <=> OLD.`total_item_count`) OR NOT(NEW.`customer_gender` <=> OLD.`customer_gender`) OR NOT(NEW.`discount_tax_compensation_amount` <=> OLD.`discount_tax_compensation_amount`) OR NOT(NEW.`base_discount_tax_compensation_amount` <=> OLD.`base_discount_tax_compensation_amount`) OR NOT(NEW.`shipping_discount_tax_compensation_amount` <=> OLD.`shipping_discount_tax_compensation_amount`) OR NOT(NEW.`base_shipping_discount_tax_compensation_amnt` <=> OLD.`base_shipping_discount_tax_compensation_amnt`) OR NOT(NEW.`discount_tax_compensation_invoiced` <=> OLD.`discount_tax_compensation_invoiced`) OR NOT(NEW.`base_discount_tax_compensation_invoiced` <=> OLD.`base_discount_tax_compensation_invoiced`) OR NOT(NEW.`discount_tax_compensation_refunded` <=> OLD.`discount_tax_compensation_refunded`) OR NOT(NEW.`base_discount_tax_compensation_refunded` <=> OLD.`base_discount_tax_compensation_refunded`) OR NOT(NEW.`shipping_incl_tax` <=> OLD.`shipping_incl_tax`) OR NOT(NEW.`base_shipping_incl_tax` <=> OLD.`base_shipping_incl_tax`) OR NOT(NEW.`coupon_rule_name` <=> OLD.`coupon_rule_name`) OR NOT(NEW.`gift_message_id` <=> OLD.`gift_message_id`) OR NOT(NEW.`paypal_ipn_customer_notified` <=> OLD.`paypal_ipn_customer_notified`) OR NOT(NEW.`dispute_status` <=> OLD.`dispute_status`) OR NOT(NEW.`mp_smtp_email_marketing_synced` <=> OLD.`mp_smtp_email_marketing_synced`) OR NOT(NEW.`mp_smtp_email_marketing_order_created` <=> OLD.`mp_smtp_email_marketing_order_created`) OR NOT(NEW.`delivery_method` <=> OLD.`delivery_method`) OR NOT(NEW.`mollie_transaction_id` <=> OLD.`mollie_transaction_id`) OR NOT(NEW.`mollie_payment_fee` <=> OLD.`mollie_payment_fee`) OR NOT(NEW.`mollie_payment_fee_tax` <=> OLD.`mollie_payment_fee_tax`) OR NOT(NEW.`base_mollie_payment_fee` <=> OLD.`base_mollie_payment_fee`) OR NOT(NEW.`base_mollie_payment_fee_tax` <=> OLD.`base_mollie_payment_fee_tax`)) THEN INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_after_delete` AFTER DELETE ON `sales_order` FOR EACH ROW BEGIN
INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `sales_order_address`
--

CREATE TABLE `sales_order_address` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned DEFAULT NULL COMMENT 'Parent ID',
  `customer_address_id` int DEFAULT NULL COMMENT 'Customer Address ID',
  `quote_address_id` int DEFAULT NULL COMMENT 'Quote Address ID',
  `region_id` int DEFAULT NULL COMMENT 'Region ID',
  `customer_id` int DEFAULT NULL COMMENT 'Customer ID',
  `fax` varchar(255) DEFAULT NULL COMMENT 'Fax',
  `region` varchar(255) DEFAULT NULL COMMENT 'Region',
  `postcode` varchar(255) DEFAULT NULL COMMENT 'Postcode',
  `lastname` varchar(255) DEFAULT NULL COMMENT 'Lastname',
  `street` varchar(255) DEFAULT NULL COMMENT 'Street',
  `city` varchar(255) DEFAULT NULL COMMENT 'City',
  `email` varchar(255) DEFAULT NULL COMMENT 'Email',
  `telephone` varchar(255) DEFAULT NULL COMMENT 'Phone Number',
  `country_id` varchar(2) DEFAULT NULL COMMENT 'Country ID',
  `firstname` varchar(255) DEFAULT NULL COMMENT 'Firstname',
  `address_type` varchar(255) DEFAULT NULL COMMENT 'Address Type',
  `prefix` varchar(255) DEFAULT NULL COMMENT 'Prefix',
  `middlename` varchar(255) DEFAULT NULL COMMENT 'Middlename',
  `suffix` varchar(255) DEFAULT NULL COMMENT 'Suffix',
  `company` varchar(255) DEFAULT NULL COMMENT 'Company',
  `vat_id` text COMMENT 'Vat ID',
  `vat_is_valid` smallint DEFAULT NULL COMMENT 'Vat Is Valid',
  `vat_request_id` text COMMENT 'Vat Request ID',
  `vat_request_date` text COMMENT 'Vat Request Date',
  `vat_request_success` smallint DEFAULT NULL COMMENT 'Vat Request Success',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_ORDER_ADDRESS_PARENT_ID` (`parent_id`),
  CONSTRAINT `SALES_ORDER_ADDRESS_PARENT_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Order Address';

--
-- Dumping data for table `sales_order_address`
--

INSERT INTO `sales_order_address` VALUES (1,1,NULL,4,20,NULL,NULL,'Guam','12345 12345','Zohaib ','89/A','London','zohaibmuhammad23@gmail.com','+3211232193','US','Muhammad ','shipping',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(2,1,NULL,5,20,NULL,NULL,'Guam','12345 12345','Zohaib ','89/A','London','zohaibmuhammad23@gmail.com','+3211232193','US','Muhammad ','billing',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(3,2,NULL,15,12,NULL,NULL,'California','12345','sadsa','xzxz','London','zohaibmuhammad23@gmail.com','+3211232193','US','sadas','shipping',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(4,2,NULL,16,12,NULL,NULL,'California','12345','sadsa','xzxz','London','zohaibmuhammad23@gmail.com','+3211232193','US','sadas','billing',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(5,3,NULL,21,20,NULL,NULL,'Guam','123456','zohaib','sasas','London','zohaibmuhammad23@gmail.com','32354467814','US','Test ','shipping',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(6,3,NULL,22,20,NULL,NULL,'Guam','123456','zohaib','sasas','London','zohaibmuhammad23@gmail.com','32354467814','US','Test ','billing',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(7,4,0,28,20,NULL,NULL,'Guam','123456','zohaib','sasas','London','zohaibmuhammad23@gmail.com','32354467814','US','Test','shipping',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(8,4,NULL,27,20,NULL,NULL,'Guam','123456','zohaib','sasas','London','zohaibmuhammad23@gmail.com','32354467814','US','Test','billing',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(9,5,NULL,36,21,NULL,NULL,'Hawaii','12345 12345','tEST2','xyz','London','zohaibmuhammad23@gmail.com','+3211232193','US','Test','shipping',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(10,5,NULL,37,21,NULL,NULL,'Hawaii','12345 12345','tEST2','xyz','London','zohaibmuhammad23@gmail.com','+3211232193','US','Test','billing',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(11,6,NULL,39,21,NULL,NULL,'Hawaii','z123','asd','czc','London','zohaibmuhammad23@gmail.com','+3211232193','US','dsssssad','shipping',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL),(12,6,NULL,40,21,NULL,NULL,'Hawaii','z123','asd','czc','London','zohaibmuhammad23@gmail.com','+3211232193','US','dsssssad','billing',NULL,NULL,NULL,'Banyo',NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `sales_order_aggregated_created`
--

CREATE TABLE `sales_order_aggregated_created` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `orders_count` int NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Qty Ordered',
  `total_qty_invoiced` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Qty Invoiced',
  `total_income_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Income Amount',
  `total_revenue_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Revenue Amount',
  `total_profit_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Profit Amount',
  `total_invoiced_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Invoiced Amount',
  `total_canceled_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Canceled Amount',
  `total_paid_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Paid Amount',
  `total_refunded_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Refunded Amount',
  `total_tax_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Tax Amount',
  `total_tax_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Tax Amount Actual',
  `total_shipping_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Shipping Amount',
  `total_shipping_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Shipping Amount Actual',
  `total_discount_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Discount Amount',
  `total_discount_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Discount Amount Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_ORDER_AGGREGATED_CREATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_ORDER_AGGREGATED_CREATED_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_ORDER_AGGREGATED_CREATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Order Aggregated Created';

--
-- Dumping data for table `sales_order_aggregated_created`
--


--
-- Table structure for table `sales_order_aggregated_updated`
--

CREATE TABLE `sales_order_aggregated_updated` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `orders_count` int NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Qty Ordered',
  `total_qty_invoiced` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Qty Invoiced',
  `total_income_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Income Amount',
  `total_revenue_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Revenue Amount',
  `total_profit_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Profit Amount',
  `total_invoiced_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Invoiced Amount',
  `total_canceled_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Canceled Amount',
  `total_paid_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Paid Amount',
  `total_refunded_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Refunded Amount',
  `total_tax_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Tax Amount',
  `total_tax_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Tax Amount Actual',
  `total_shipping_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Shipping Amount',
  `total_shipping_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Shipping Amount Actual',
  `total_discount_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Discount Amount',
  `total_discount_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Discount Amount Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_ORDER_AGGREGATED_UPDATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_ORDER_AGGREGATED_UPDATED_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_ORDER_AGGREGATED_UPDATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Order Aggregated Updated';

--
-- Dumping data for table `sales_order_aggregated_updated`
--


--
-- Table structure for table `sales_order_data_exporter_cl`
--

CREATE TABLE `sales_order_data_exporter_cl` (
  `version_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Version ID',
  `entity_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  PRIMARY KEY (`version_id`)
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb3 COMMENT='sales_order_data_exporter_cl';

--
-- Dumping data for table `sales_order_data_exporter_cl`
--

INSERT INTO `sales_order_data_exporter_cl` VALUES (41,6);

--
-- Table structure for table `sales_order_grid`
--

CREATE TABLE `sales_order_grid` (
  `entity_id` int unsigned NOT NULL COMMENT 'Entity ID',
  `status` varchar(32) DEFAULT NULL COMMENT 'Status',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `customer_id` int unsigned DEFAULT NULL COMMENT 'Customer ID',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Paid',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Total Paid',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `order_currency_code` varchar(255) DEFAULT NULL COMMENT 'Order Currency Code',
  `shipping_name` varchar(255) DEFAULT NULL COMMENT 'Shipping Name',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group` varchar(255) DEFAULT NULL COMMENT 'Customer Group',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(20,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `customer_name` varchar(255) DEFAULT NULL COMMENT 'Customer Name',
  `payment_method` varchar(255) DEFAULT NULL COMMENT 'Payment Method',
  `total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Refunded',
  `pickup_location_code` varchar(255) DEFAULT NULL COMMENT 'Pickup Location Code',
  `dispute_status` varchar(45) DEFAULT NULL COMMENT 'Braintree Dispute Status',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_ORDER_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_ORDER_GRID_STATUS` (`status`),
  KEY `SALES_ORDER_GRID_STORE_ID` (`store_id`),
  KEY `SALES_ORDER_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `SALES_ORDER_GRID_BASE_TOTAL_PAID` (`base_total_paid`),
  KEY `SALES_ORDER_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `SALES_ORDER_GRID_TOTAL_PAID` (`total_paid`),
  KEY `SALES_ORDER_GRID_SHIPPING_NAME` (`shipping_name`),
  KEY `SALES_ORDER_GRID_BILLING_NAME` (`billing_name`),
  KEY `SALES_ORDER_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_ORDER_GRID_CUSTOMER_ID` (`customer_id`),
  KEY `SALES_ORDER_GRID_UPDATED_AT` (`updated_at`),
  KEY `SALES_ORDER_GRID_PICKUP_LOCATION_CODE` (`pickup_location_code`),
  FULLTEXT KEY `FTI_65B9E9925EC58F0C7C2E2F6379C233E7` (`increment_id`,`billing_name`,`shipping_name`,`shipping_address`,`billing_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Order Grid';

--
-- Dumping data for table `sales_order_grid`
--

INSERT INTO `sales_order_grid` VALUES (1,'processing',1,'Main Website\nMain Website Store\nDefault Store View',NULL,865.0000,NULL,865.0000,NULL,'000000003','USD','USD','Muhammad  Zohaib','Muhammad  Zohaib','2025-01-07 13:54:08','2025-01-14 09:42:28','Banyo,89/A,London,Guam,12345 12345','Banyo,89/A,London,Guam,12345 12345','Flat Rate - Fixed','zohaibmuhammad23@gmail.com','0',860.0000,5.0000,'Muhammad  Zohaib','checkmo',NULL,NULL,NULL),(2,'pending',1,'Main Website\nMain Website Store\nDefault Store View',NULL,394.9900,NULL,394.9900,NULL,'000000004','USD','USD','sadas sadsa','sadas sadsa','2025-01-28 08:41:05','2025-01-28 08:41:05','Banyo,xzxz,London,California,12345','Banyo,xzxz,London,California,12345','Van Delivery - Shipping Test','zohaibmuhammad23@gmail.com','0',349.9900,45.0000,'sadas sadsa','checkmo',NULL,NULL,NULL),(3,'canceled',1,'Main Website\nMain Website Store\nDefault Store View',NULL,394.9900,NULL,394.9900,NULL,'000000005','USD','USD','Test  zohaib','Test  zohaib','2025-01-29 15:40:47','2025-01-29 15:54:41','Banyo,sasas,London,Guam,123456','Banyo,sasas,London,Guam,123456','Van Delivery - Shipping Test','zohaibmuhammad23@gmail.com','0',349.9900,45.0000,'Test  zohaib','checkmo',NULL,NULL,NULL),(4,'processing',1,'Main Website\nMain Website Store\nDefault Store View',NULL,394.9900,NULL,394.9900,NULL,'000000005-1','USD','USD','Test zohaib','Test zohaib','2025-01-29 15:54:40','2025-01-29 15:56:59','Banyo,sasas,London,Guam,123456','Banyo,sasas,London,Guam,123456','Van Delivery - Shipping Test','zohaibmuhammad23@gmail.com','0',349.9900,45.0000,'Test zohaib','adminpaymentmethod',NULL,NULL,NULL),(5,'pending',1,'Main Website\nMain Website Store\nDefault Store View',NULL,761.8000,NULL,761.8000,NULL,'000000006','GBP','GBP','Test tEST2','Test tEST2','2025-02-12 10:15:49','2025-02-12 10:15:49','Banyo,xyz,London,Hawaii,12345 12345','Banyo,xyz,London,Hawaii,12345 12345','Van Delivery - Gazco','zohaibmuhammad23@gmail.com','0',716.8000,45.0000,'Test tEST2','checkmo',NULL,NULL,NULL),(6,'pending',1,'Main Website\nMain Website Store\nDefault Store View',NULL,323.4000,NULL,323.4000,NULL,'000000007','GBP','GBP','dsssssad asd','dsssssad asd','2025-02-12 11:43:16','2025-02-12 11:43:16','Banyo,czc,London,Hawaii,z123','Banyo,czc,London,Hawaii,z123','Van Delivery - Gazco','zohaibmuhammad23@gmail.com','0',278.4000,45.0000,'dsssssad asd','checkmo',NULL,NULL,NULL);

--
-- Table structure for table `sales_order_item`
--

CREATE TABLE `sales_order_item` (
  `item_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item ID',
  `order_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Order ID',
  `parent_item_id` int unsigned DEFAULT NULL COMMENT 'Parent Item ID',
  `quote_item_id` int unsigned DEFAULT NULL COMMENT 'Quote Item ID',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `product_id` int unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_type` varchar(255) DEFAULT NULL COMMENT 'Product Type',
  `product_options` longtext COMMENT 'Product Options',
  `weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Weight',
  `is_virtual` smallint unsigned DEFAULT NULL COMMENT 'Is Virtual',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `description` text COMMENT 'Description',
  `applied_rule_ids` text COMMENT 'Applied Rule Ids',
  `additional_data` text COMMENT 'Additional Data',
  `is_qty_decimal` smallint unsigned DEFAULT NULL COMMENT 'Is Qty Decimal',
  `no_discount` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'No Discount',
  `qty_backordered` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Backordered',
  `qty_canceled` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Canceled',
  `qty_invoiced` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Invoiced',
  `qty_ordered` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `qty_refunded` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Refunded',
  `qty_shipped` decimal(12,4) DEFAULT '0.0000' COMMENT 'Qty Shipped',
  `base_cost` decimal(12,4) DEFAULT '0.0000' COMMENT 'Base Cost',
  `price` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `base_price` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Price',
  `original_price` decimal(20,4) DEFAULT NULL COMMENT 'Original Price',
  `base_original_price` decimal(20,4) DEFAULT NULL COMMENT 'Base Original Price',
  `tax_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Percent',
  `tax_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Tax Amount',
  `base_tax_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Tax Amount',
  `tax_invoiced` decimal(20,4) DEFAULT '0.0000' COMMENT 'Tax Invoiced',
  `base_tax_invoiced` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Tax Invoiced',
  `discount_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Discount Percent',
  `discount_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Discount Amount',
  `base_discount_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Discount Amount',
  `discount_invoiced` decimal(20,4) DEFAULT '0.0000' COMMENT 'Discount Invoiced',
  `base_discount_invoiced` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Discount Invoiced',
  `amount_refunded` decimal(20,4) DEFAULT '0.0000' COMMENT 'Amount Refunded',
  `base_amount_refunded` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Amount Refunded',
  `row_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Total',
  `base_row_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Total',
  `row_invoiced` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Invoiced',
  `base_row_invoiced` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Invoiced',
  `row_weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Weight',
  `base_tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Before Discount',
  `tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Before Discount',
  `ext_order_item_id` varchar(255) DEFAULT NULL COMMENT 'Ext Order Item ID',
  `locked_do_invoice` smallint unsigned DEFAULT NULL COMMENT 'Locked Do Invoice',
  `locked_do_ship` smallint unsigned DEFAULT NULL COMMENT 'Locked Do Ship',
  `price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `base_row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Invoiced',
  `base_discount_tax_compensation_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Invoiced',
  `discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Refunded',
  `base_discount_tax_compensation_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Refunded',
  `tax_canceled` decimal(12,4) DEFAULT NULL COMMENT 'Tax Canceled',
  `discount_tax_compensation_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Canceled',
  `tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Tax Refunded',
  `base_tax_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Refunded',
  `discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Discount Refunded',
  `base_discount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Refunded',
  `gift_message_id` int DEFAULT NULL COMMENT 'Gift Message ID',
  `gift_message_available` int DEFAULT NULL COMMENT 'Gift Message Available',
  `free_shipping` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Free Shipping',
  `weee_tax_applied` text COMMENT 'Weee Tax Applied',
  `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',
  `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',
  `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',
  `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',
  `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',
  `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',
  `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',
  `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',
  PRIMARY KEY (`item_id`),
  KEY `SALES_ORDER_ITEM_ORDER_ID` (`order_id`),
  KEY `SALES_ORDER_ITEM_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_ORDER_ITEM_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `SALES_ORDER_ITEM_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Order Item';

--
-- Dumping data for table `sales_order_item`
--

INSERT INTO `sales_order_item` VALUES (1,1,NULL,1,1,'2025-01-07 13:54:08','2025-01-14 09:42:28',4894,'simple','{\"info_buyRequest\":{\"uenc\":\"aHR0cDovLzE1Ny4yMzAuMjA5LjE3NC9pbmRleC5waHAvZnJhbmtlLTgwMC1ob29kLWZ2YXMtYTgwLWJrLTItdm9pY2UtYXBwLXJlbW90ZS1jb250cm9sLmh0bWw~\",\"product\":\"4894\",\"selected_configurable_option\":\"\",\"related_product\":\"\",\"item\":\"4894\",\"id\":\"4894\",\"qty\":1}}',NULL,0,'FVAS A80 BK Z1','Franke 800 Hood FVAS A80 BK/2 Voice, App, & Remote Control',NULL,NULL,NULL,0,0,NULL,0.0000,0.0000,1.0000,0.0000,1.0000,967.5000,860.0000,860.0000,1075.0000,1075.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,860.0000,860.0000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,860.0000,860.0000,860.0000,860.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(2,2,NULL,5,1,'2025-01-28 08:41:05','2025-01-28 08:41:05',1162,'simple','{\"info_buyRequest\":{\"uenc\":\"aHR0cHM6Ly9oeXZhLXN0YWdpbmcuYmFueW8uY28udWsvaW5kZXgucGhwL3JlZ2lub3gtY29tZm9ydC1jb2xvcmFkby1sLWludGVncmF0ZWQtMS1ib3dsLWtpdGNoZW4tc2luay5odG1s\",\"product\":\"1162\",\"selected_configurable_option\":\"\",\"related_product\":\"\",\"item\":\"1162\",\"id\":\"1162\",\"qty\":1}}',NULL,0,'Reginox Comfort Colorado L Integrated 1 Bowl Kitchen Sink','Reginox Comfort Colorado L Integrated 1 Bowl Kitchen Sink',NULL,NULL,NULL,0,0,NULL,0.0000,0.0000,1.0000,0.0000,0.0000,NULL,349.9900,349.9900,349.9900,349.9900,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,349.9900,349.9900,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,349.9900,349.9900,349.9900,349.9900,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(3,3,NULL,7,1,'2025-01-29 15:40:47','2025-01-29 15:54:41',1162,'simple','{\"info_buyRequest\":{\"uenc\":\"aHR0cHM6Ly9oeXZhLXN0YWdpbmcuYmFueW8uY28udWsvaW5kZXgucGhwL3JlZ2lub3gtY29tZm9ydC1jb2xvcmFkby1sLWludGVncmF0ZWQtMS1ib3dsLWtpdGNoZW4tc2luay5odG1s\",\"product\":\"1162\",\"selected_configurable_option\":\"\",\"related_product\":\"\",\"item\":\"1162\",\"id\":\"1162\",\"qty\":1}}',NULL,0,'Reginox Comfort Colorado L Integrated 1 Bowl Kitchen Sink','Reginox Comfort Colorado L Integrated 1 Bowl Kitchen Sink',NULL,NULL,NULL,0,0,NULL,1.0000,0.0000,1.0000,0.0000,0.0000,NULL,349.9900,349.9900,349.9900,349.9900,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,349.9900,349.9900,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,349.9900,349.9900,349.9900,349.9900,0.0000,0.0000,NULL,NULL,NULL,NULL,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(4,4,NULL,10,1,'2025-01-29 15:54:40','2025-01-29 15:56:59',1162,'simple','{\"info_buyRequest\":{\"uenc\":\"aHR0cHM6Ly9oeXZhLXN0YWdpbmcuYmFueW8uY28udWsvaW5kZXgucGhwL3JlZ2lub3gtY29tZm9ydC1jb2xvcmFkby1sLWludGVncmF0ZWQtMS1ib3dsLWtpdGNoZW4tc2luay5odG1s\",\"product\":\"1162\",\"selected_configurable_option\":\"\",\"related_product\":\"\",\"item\":\"1162\",\"id\":\"1162\",\"qty\":1,\"options\":[]}}',NULL,0,'Reginox Comfort Colorado L Integrated 1 Bowl Kitchen Sink','Reginox Comfort Colorado L Integrated 1 Bowl Kitchen Sink',NULL,NULL,NULL,0,0,NULL,0.0000,0.0000,1.0000,0.0000,1.0000,NULL,349.9900,349.9900,349.9900,349.9900,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,349.9900,349.9900,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,349.9900,349.9900,349.9900,349.9900,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(5,5,NULL,14,1,'2025-02-12 10:15:49','2025-02-12 10:15:49',11293,'simple','{\"info_buyRequest\":{\"uenc\":\"aHR0cHM6Ly9oeXZhLXN0YWdpbmcuYmFueW8uY28udWsv\",\"product\":\"11293\",\"qty\":1}}',NULL,0,'FTLN H45 X/BK GLASS A90 FRK','Franke Avant Silence FTLN H45 X/BK GLASS 900 Wall Hood ',NULL,NULL,NULL,0,0,NULL,0.0000,0.0000,1.0000,0.0000,0.0000,806.2400,716.8000,716.8000,896.0000,896.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,716.8000,716.8000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,716.8000,716.8000,716.8000,716.8000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(6,6,NULL,15,1,'2025-02-12 11:43:16','2025-02-12 11:43:16',6035,'simple','{\"info_buyRequest\":{\"uenc\":\"aHR0cHM6Ly9oeXZhLXN0YWdpbmcuYmFueW8uY28udWsvYmxhbmNvLXZpY3VzLWJyaWdnZS1kb3VibGUtbGV2ZXIta2l0Y2hlbi1zaW5rLW1peGVyLXRhcC5odG1s\",\"product\":\"6035\",\"qty\":1}}',NULL,0,'122.0606.948','Franke Mythos MYX 110-34 Undermount Single Bowl Sink -Stainless Steel test ',NULL,NULL,NULL,0,0,NULL,0.0000,0.0000,1.0000,0.0000,0.0000,312.9400,278.4000,278.4000,348.0000,348.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,278.4000,278.4000,0.0000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,278.4000,278.4000,278.4000,278.4000,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_item_after_insert` AFTER INSERT ON `sales_order_item` FOR EACH ROW BEGIN
INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`order_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_item_after_update` AFTER UPDATE ON `sales_order_item` FOR EACH ROW BEGIN
IF (NOT(NEW.`item_id` <=> OLD.`item_id`) OR NOT(NEW.`order_id` <=> OLD.`order_id`) OR NOT(NEW.`parent_item_id` <=> OLD.`parent_item_id`) OR NOT(NEW.`quote_item_id` <=> OLD.`quote_item_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`created_at` <=> OLD.`created_at`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`product_type` <=> OLD.`product_type`) OR NOT(NEW.`product_options` <=> OLD.`product_options`) OR NOT(NEW.`weight` <=> OLD.`weight`) OR NOT(NEW.`is_virtual` <=> OLD.`is_virtual`) OR NOT(NEW.`sku` <=> OLD.`sku`) OR NOT(NEW.`name` <=> OLD.`name`) OR NOT(NEW.`description` <=> OLD.`description`) OR NOT(NEW.`applied_rule_ids` <=> OLD.`applied_rule_ids`) OR NOT(NEW.`additional_data` <=> OLD.`additional_data`) OR NOT(NEW.`is_qty_decimal` <=> OLD.`is_qty_decimal`) OR NOT(NEW.`no_discount` <=> OLD.`no_discount`) OR NOT(NEW.`qty_backordered` <=> OLD.`qty_backordered`) OR NOT(NEW.`qty_canceled` <=> OLD.`qty_canceled`) OR NOT(NEW.`qty_invoiced` <=> OLD.`qty_invoiced`) OR NOT(NEW.`qty_ordered` <=> OLD.`qty_ordered`) OR NOT(NEW.`qty_refunded` <=> OLD.`qty_refunded`) OR NOT(NEW.`qty_shipped` <=> OLD.`qty_shipped`) OR NOT(NEW.`base_cost` <=> OLD.`base_cost`) OR NOT(NEW.`price` <=> OLD.`price`) OR NOT(NEW.`base_price` <=> OLD.`base_price`) OR NOT(NEW.`original_price` <=> OLD.`original_price`) OR NOT(NEW.`base_original_price` <=> OLD.`base_original_price`) OR NOT(NEW.`tax_percent` <=> OLD.`tax_percent`) OR NOT(NEW.`tax_amount` <=> OLD.`tax_amount`) OR NOT(NEW.`base_tax_amount` <=> OLD.`base_tax_amount`) OR NOT(NEW.`tax_invoiced` <=> OLD.`tax_invoiced`) OR NOT(NEW.`base_tax_invoiced` <=> OLD.`base_tax_invoiced`) OR NOT(NEW.`discount_percent` <=> OLD.`discount_percent`) OR NOT(NEW.`discount_amount` <=> OLD.`discount_amount`) OR NOT(NEW.`base_discount_amount` <=> OLD.`base_discount_amount`) OR NOT(NEW.`discount_invoiced` <=> OLD.`discount_invoiced`) OR NOT(NEW.`base_discount_invoiced` <=> OLD.`base_discount_invoiced`) OR NOT(NEW.`amount_refunded` <=> OLD.`amount_refunded`) OR NOT(NEW.`base_amount_refunded` <=> OLD.`base_amount_refunded`) OR NOT(NEW.`row_total` <=> OLD.`row_total`) OR NOT(NEW.`base_row_total` <=> OLD.`base_row_total`) OR NOT(NEW.`row_invoiced` <=> OLD.`row_invoiced`) OR NOT(NEW.`base_row_invoiced` <=> OLD.`base_row_invoiced`) OR NOT(NEW.`row_weight` <=> OLD.`row_weight`) OR NOT(NEW.`base_tax_before_discount` <=> OLD.`base_tax_before_discount`) OR NOT(NEW.`tax_before_discount` <=> OLD.`tax_before_discount`) OR NOT(NEW.`ext_order_item_id` <=> OLD.`ext_order_item_id`) OR NOT(NEW.`locked_do_invoice` <=> OLD.`locked_do_invoice`) OR NOT(NEW.`locked_do_ship` <=> OLD.`locked_do_ship`) OR NOT(NEW.`price_incl_tax` <=> OLD.`price_incl_tax`) OR NOT(NEW.`base_price_incl_tax` <=> OLD.`base_price_incl_tax`) OR NOT(NEW.`row_total_incl_tax` <=> OLD.`row_total_incl_tax`) OR NOT(NEW.`base_row_total_incl_tax` <=> OLD.`base_row_total_incl_tax`) OR NOT(NEW.`discount_tax_compensation_amount` <=> OLD.`discount_tax_compensation_amount`) OR NOT(NEW.`base_discount_tax_compensation_amount` <=> OLD.`base_discount_tax_compensation_amount`) OR NOT(NEW.`discount_tax_compensation_invoiced` <=> OLD.`discount_tax_compensation_invoiced`) OR NOT(NEW.`base_discount_tax_compensation_invoiced` <=> OLD.`base_discount_tax_compensation_invoiced`) OR NOT(NEW.`discount_tax_compensation_refunded` <=> OLD.`discount_tax_compensation_refunded`) OR NOT(NEW.`base_discount_tax_compensation_refunded` <=> OLD.`base_discount_tax_compensation_refunded`) OR NOT(NEW.`tax_canceled` <=> OLD.`tax_canceled`) OR NOT(NEW.`discount_tax_compensation_canceled` <=> OLD.`discount_tax_compensation_canceled`) OR NOT(NEW.`tax_refunded` <=> OLD.`tax_refunded`) OR NOT(NEW.`base_tax_refunded` <=> OLD.`base_tax_refunded`) OR NOT(NEW.`discount_refunded` <=> OLD.`discount_refunded`) OR NOT(NEW.`base_discount_refunded` <=> OLD.`base_discount_refunded`) OR NOT(NEW.`gift_message_id` <=> OLD.`gift_message_id`) OR NOT(NEW.`gift_message_available` <=> OLD.`gift_message_available`) OR NOT(NEW.`free_shipping` <=> OLD.`free_shipping`) OR NOT(NEW.`weee_tax_applied` <=> OLD.`weee_tax_applied`) OR NOT(NEW.`weee_tax_applied_amount` <=> OLD.`weee_tax_applied_amount`) OR NOT(NEW.`weee_tax_applied_row_amount` <=> OLD.`weee_tax_applied_row_amount`) OR NOT(NEW.`weee_tax_disposition` <=> OLD.`weee_tax_disposition`) OR NOT(NEW.`weee_tax_row_disposition` <=> OLD.`weee_tax_row_disposition`) OR NOT(NEW.`base_weee_tax_applied_amount` <=> OLD.`base_weee_tax_applied_amount`) OR NOT(NEW.`base_weee_tax_applied_row_amnt` <=> OLD.`base_weee_tax_applied_row_amnt`) OR NOT(NEW.`base_weee_tax_disposition` <=> OLD.`base_weee_tax_disposition`) OR NOT(NEW.`base_weee_tax_row_disposition` <=> OLD.`base_weee_tax_row_disposition`)) THEN INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`order_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_item_after_delete` AFTER DELETE ON `sales_order_item` FOR EACH ROW BEGIN
INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (OLD.`order_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `sales_order_payment`
--

CREATE TABLE `sales_order_payment` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `base_shipping_captured` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Captured',
  `shipping_captured` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Captured',
  `amount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Amount Refunded',
  `base_amount_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Paid',
  `amount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Amount Canceled',
  `base_amount_authorized` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Authorized',
  `base_amount_paid_online` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Paid Online',
  `base_amount_refunded_online` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Refunded Online',
  `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `amount_paid` decimal(20,4) DEFAULT NULL COMMENT 'Amount Paid',
  `amount_authorized` decimal(20,4) DEFAULT NULL COMMENT 'Amount Authorized',
  `base_amount_ordered` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Ordered',
  `base_shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Refunded',
  `shipping_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Refunded',
  `base_amount_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Refunded',
  `amount_ordered` decimal(20,4) DEFAULT NULL COMMENT 'Amount Ordered',
  `base_amount_canceled` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount Canceled',
  `quote_payment_id` int DEFAULT NULL COMMENT 'Quote Payment ID',
  `additional_data` text COMMENT 'Additional Data',
  `cc_exp_month` varchar(12) DEFAULT NULL COMMENT 'Cc Exp Month',
  `cc_ss_start_year` varchar(12) DEFAULT NULL COMMENT 'Cc Ss Start Year',
  `echeck_bank_name` varchar(128) DEFAULT NULL COMMENT 'Echeck Bank Name',
  `method` varchar(128) DEFAULT NULL COMMENT 'Method',
  `cc_debug_request_body` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Request Body',
  `cc_secure_verify` varchar(32) DEFAULT NULL COMMENT 'Cc Secure Verify',
  `protection_eligibility` varchar(32) DEFAULT NULL COMMENT 'Protection Eligibility',
  `cc_approval` varchar(32) DEFAULT NULL COMMENT 'Cc Approval',
  `cc_last_4` varchar(100) DEFAULT NULL COMMENT 'Cc Last 4',
  `cc_status_description` varchar(32) DEFAULT NULL COMMENT 'Cc Status Description',
  `echeck_type` varchar(32) DEFAULT NULL COMMENT 'Echeck Type',
  `cc_debug_response_serialized` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Response Serialized',
  `cc_ss_start_month` varchar(128) DEFAULT NULL COMMENT 'Cc Ss Start Month',
  `echeck_account_type` varchar(255) DEFAULT NULL COMMENT 'Echeck Account Type',
  `last_trans_id` varchar(255) DEFAULT NULL COMMENT 'Last Trans ID',
  `cc_cid_status` varchar(32) DEFAULT NULL COMMENT 'Cc Cid Status',
  `cc_owner` varchar(128) DEFAULT NULL COMMENT 'Cc Owner',
  `cc_type` varchar(32) DEFAULT NULL COMMENT 'Cc Type',
  `po_number` varchar(32) DEFAULT NULL COMMENT 'Po Number',
  `cc_exp_year` varchar(4) DEFAULT NULL COMMENT 'Cc Exp Year',
  `cc_status` varchar(4) DEFAULT NULL COMMENT 'Cc Status',
  `echeck_routing_number` varchar(32) DEFAULT NULL COMMENT 'Echeck Routing Number',
  `account_status` varchar(32) DEFAULT NULL COMMENT 'Account Status',
  `anet_trans_method` varchar(32) DEFAULT NULL COMMENT 'Anet Trans Method',
  `cc_debug_response_body` varchar(32) DEFAULT NULL COMMENT 'Cc Debug Response Body',
  `cc_ss_issue` varchar(32) DEFAULT NULL COMMENT 'Cc Ss Issue',
  `echeck_account_name` varchar(32) DEFAULT NULL COMMENT 'Echeck Account Name',
  `cc_avs_status` varchar(32) DEFAULT NULL COMMENT 'Cc Avs Status',
  `cc_number_enc` varchar(128) DEFAULT NULL,
  `cc_trans_id` varchar(32) DEFAULT NULL COMMENT 'Cc Trans ID',
  `address_status` varchar(32) DEFAULT NULL COMMENT 'Address Status',
  `additional_information` text COMMENT 'Additional Information',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_ORDER_PAYMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `SALES_ORDER_PAYMENT_PARENT_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Order Payment';

--
-- Dumping data for table `sales_order_payment`
--

INSERT INTO `sales_order_payment` VALUES (1,1,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,5.0000,5.0000,NULL,NULL,865.0000,NULL,NULL,NULL,865.0000,NULL,NULL,NULL,NULL,'0',NULL,'checkmo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'{\"method_title\":\"Check \\/ Money order\"}'),(2,2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,394.9900,NULL,NULL,NULL,394.9900,NULL,NULL,NULL,NULL,'0',NULL,'checkmo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'{\"method_title\":\"Check \\/ Money order\"}'),(3,3,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,394.9900,NULL,NULL,NULL,394.9900,NULL,NULL,NULL,NULL,'0',NULL,'checkmo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'{\"method_title\":\"Check \\/ Money order\"}'),(4,4,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,394.9900,NULL,NULL,NULL,394.9900,NULL,NULL,NULL,NULL,'0',NULL,'adminpaymentmethod',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'{\"method_title\":\"Admin Payment Method\"}'),(5,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,761.8000,NULL,NULL,NULL,761.8000,NULL,NULL,NULL,NULL,'0',NULL,'checkmo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'{\"method_title\":\"Check \\/ Money order\"}'),(6,6,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,45.0000,45.0000,NULL,NULL,323.4000,NULL,NULL,NULL,323.4000,NULL,NULL,NULL,NULL,'0',NULL,'checkmo',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,'0',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'{\"method_title\":\"Check \\/ Money order\"}');

--
-- Table structure for table `sales_order_status`
--

CREATE TABLE `sales_order_status` (
  `status` varchar(32) NOT NULL COMMENT 'Status',
  `label` varchar(128) NOT NULL COMMENT 'Label',
  PRIMARY KEY (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Order Status Table';

--
-- Dumping data for table `sales_order_status`
--

INSERT INTO `sales_order_status` VALUES ('canceled','Canceled'),('closed','Closed'),('complete','Complete'),('fraud','Suspected Fraud'),('holded','On Hold'),('payment_review','Payment Review'),('paypal_canceled_reversal','PayPal Canceled Reversal'),('paypal_reversed','PayPal Reversed'),('pending','Pending'),('pending_payment','Pending Payment'),('pending_paypal','Pending PayPal'),('processing','Processing');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_status_after_insert` AFTER INSERT ON `sales_order_status` FOR EACH ROW BEGIN
INSERT IGNORE INTO `sales_order_status_data_exporter_cl` (`entity_id`) VALUES (NEW.`status`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_status_after_update` AFTER UPDATE ON `sales_order_status` FOR EACH ROW BEGIN
IF (NOT(NEW.`status` <=> OLD.`status`) OR NOT(NEW.`label` <=> OLD.`label`)) THEN INSERT IGNORE INTO `sales_order_status_data_exporter_cl` (`entity_id`) VALUES (NEW.`status`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_order_status_after_delete` AFTER DELETE ON `sales_order_status` FOR EACH ROW BEGIN
INSERT IGNORE INTO `sales_order_status_data_exporter_cl` (`entity_id`) VALUES (OLD.`status`);
END */;;
DELIMITER ;

--
-- Table structure for table `sales_order_status_data_exporter_cl`
--

CREATE TABLE `sales_order_status_data_exporter_cl` (
  `version_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Version ID',
  `entity_id` varchar(32) NOT NULL DEFAULT '' COMMENT 'Order status',
  PRIMARY KEY (`version_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 COMMENT='sales_order_status_data_exporter_cl';

--
-- Dumping data for table `sales_order_status_data_exporter_cl`
--

INSERT INTO `sales_order_status_data_exporter_cl` VALUES (12,'paypal_canceled_reversal');

--
-- Table structure for table `sales_order_status_history`
--

CREATE TABLE `sales_order_status_history` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `is_customer_notified` int DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `status` varchar(32) DEFAULT NULL COMMENT 'Status',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `entity_name` varchar(32) DEFAULT NULL COMMENT 'Shows what entity history is bind to.',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_ORDER_STATUS_HISTORY_PARENT_ID` (`parent_id`),
  KEY `SALES_ORDER_STATUS_HISTORY_CREATED_AT` (`created_at`),
  CONSTRAINT `SALES_ORDER_STATUS_HISTORY_PARENT_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Order Status History';

--
-- Dumping data for table `sales_order_status_history`
--

INSERT INTO `sales_order_status_history` VALUES (1,1,1,1,'test','processing','2025-01-14 09:45:05','order'),(2,1,1,1,'test','processing','2025-01-14 09:45:50','order'),(3,3,1,1,'hbhu','pending','2025-01-29 15:49:03','order'),(4,3,1,1,'hbhu','pending','2025-01-29 15:49:04','order'),(5,3,1,1,'hbhu','pending','2025-01-29 15:49:10','order'),(6,3,1,1,'hbhu','pending','2025-01-29 15:49:18','order'),(7,3,1,1,'hbhu','pending','2025-01-29 15:49:19','order'),(8,3,1,1,'hbhu','pending','2025-01-29 15:49:20','order'),(9,4,0,1,'Order Placed by Store Administrator','pending','2025-01-29 15:54:40','order'),(10,4,0,0,'Order Placed by hyva Banyo using Admin Panel','pending','2025-01-29 15:54:40','order'),(11,4,1,1,'sdsdsds','processing','2025-01-29 15:57:31','order'),(12,4,0,1,'sdsdsds','processing','2025-01-29 15:57:38','order');

--
-- Table structure for table `sales_order_status_label`
--

CREATE TABLE `sales_order_status_label` (
  `status` varchar(32) NOT NULL COMMENT 'Status',
  `store_id` smallint unsigned NOT NULL COMMENT 'Store ID',
  `label` varchar(128) NOT NULL COMMENT 'Label',
  PRIMARY KEY (`status`,`store_id`),
  KEY `SALES_ORDER_STATUS_LABEL_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_ORDER_STATUS_LABEL_STATUS_SALES_ORDER_STATUS_STATUS` FOREIGN KEY (`status`) REFERENCES `sales_order_status` (`status`) ON DELETE CASCADE,
  CONSTRAINT `SALES_ORDER_STATUS_LABEL_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Order Status Label Table';

--
-- Dumping data for table `sales_order_status_label`
--


--
-- Table structure for table `sales_order_status_state`
--

CREATE TABLE `sales_order_status_state` (
  `status` varchar(32) NOT NULL COMMENT 'Status',
  `state` varchar(32) NOT NULL COMMENT 'Label',
  `is_default` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Is Default',
  `visible_on_front` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Visible on front',
  PRIMARY KEY (`status`,`state`),
  CONSTRAINT `SALES_ORDER_STATUS_STATE_STATUS_SALES_ORDER_STATUS_STATUS` FOREIGN KEY (`status`) REFERENCES `sales_order_status` (`status`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Order Status Table';

--
-- Dumping data for table `sales_order_status_state`
--

INSERT INTO `sales_order_status_state` VALUES ('canceled','canceled',1,1),('closed','closed',1,1),('complete','complete',1,1),('fraud','payment_review',0,1),('fraud','processing',0,1),('holded','holded',1,1),('payment_review','payment_review',1,1),('pending','new',1,1),('pending_payment','pending_payment',1,0),('processing','processing',1,1);

--
-- Table structure for table `sales_order_tax`
--

CREATE TABLE `sales_order_tax` (
  `tax_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Tax ID',
  `order_id` int unsigned NOT NULL COMMENT 'Order ID',
  `code` varchar(255) DEFAULT NULL COMMENT 'Code',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  `percent` decimal(12,4) DEFAULT NULL COMMENT 'Percent',
  `amount` decimal(20,4) DEFAULT NULL COMMENT 'Amount',
  `priority` int NOT NULL COMMENT 'Priority',
  `position` int NOT NULL COMMENT 'Position',
  `base_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Amount',
  `process` smallint NOT NULL COMMENT 'Process',
  `base_real_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Real Amount',
  PRIMARY KEY (`tax_id`),
  KEY `SALES_ORDER_TAX_ORDER_ID_PRIORITY_POSITION` (`order_id`,`priority`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Order Tax Table';

--
-- Dumping data for table `sales_order_tax`
--


--
-- Table structure for table `sales_order_tax_item`
--

CREATE TABLE `sales_order_tax_item` (
  `tax_item_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Tax Item ID',
  `tax_id` int unsigned NOT NULL COMMENT 'Tax ID',
  `item_id` int unsigned DEFAULT NULL COMMENT 'Item ID',
  `tax_percent` decimal(12,4) NOT NULL COMMENT 'Real Tax Percent For Item',
  `amount` decimal(20,4) NOT NULL COMMENT 'Tax amount for the item and tax rate',
  `base_amount` decimal(20,4) NOT NULL COMMENT 'Base tax amount for the item and tax rate',
  `real_amount` decimal(20,4) NOT NULL COMMENT 'Real tax amount for the item and tax rate',
  `real_base_amount` decimal(20,4) NOT NULL COMMENT 'Real base tax amount for the item and tax rate',
  `associated_item_id` int unsigned DEFAULT NULL COMMENT 'Id of the associated item',
  `taxable_item_type` varchar(32) NOT NULL COMMENT 'Type of the taxable item',
  PRIMARY KEY (`tax_item_id`),
  UNIQUE KEY `SALES_ORDER_TAX_ITEM_TAX_ID_ITEM_ID` (`tax_id`,`item_id`),
  KEY `SALES_ORDER_TAX_ITEM_ASSOCIATED_ITEM_ID_SALES_ORDER_ITEM_ITEM_ID` (`associated_item_id`),
  KEY `SALES_ORDER_TAX_ITEM_ITEM_ID` (`item_id`),
  CONSTRAINT `SALES_ORDER_TAX_ITEM_ASSOCIATED_ITEM_ID_SALES_ORDER_ITEM_ITEM_ID` FOREIGN KEY (`associated_item_id`) REFERENCES `sales_order_item` (`item_id`) ON DELETE CASCADE,
  CONSTRAINT `SALES_ORDER_TAX_ITEM_ITEM_ID_SALES_ORDER_ITEM_ITEM_ID` FOREIGN KEY (`item_id`) REFERENCES `sales_order_item` (`item_id`) ON DELETE CASCADE,
  CONSTRAINT `SALES_ORDER_TAX_ITEM_TAX_ID_SALES_ORDER_TAX_TAX_ID` FOREIGN KEY (`tax_id`) REFERENCES `sales_order_tax` (`tax_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Order Tax Item';

--
-- Dumping data for table `sales_order_tax_item`
--


--
-- Table structure for table `sales_payment_transaction`
--

CREATE TABLE `sales_payment_transaction` (
  `transaction_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Transaction ID',
  `parent_id` int unsigned DEFAULT NULL COMMENT 'Parent ID',
  `order_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Order ID',
  `payment_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Payment ID',
  `txn_id` varchar(100) DEFAULT NULL COMMENT 'Txn ID',
  `parent_txn_id` varchar(100) DEFAULT NULL COMMENT 'Parent Txn ID',
  `txn_type` varchar(15) DEFAULT NULL COMMENT 'Txn Type',
  `is_closed` smallint unsigned NOT NULL DEFAULT '1' COMMENT 'Is Closed',
  `additional_information` blob COMMENT 'Additional Information',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`transaction_id`),
  UNIQUE KEY `SALES_PAYMENT_TRANSACTION_ORDER_ID_PAYMENT_ID_TXN_ID` (`order_id`,`payment_id`,`txn_id`),
  KEY `SALES_PAYMENT_TRANSACTION_PARENT_ID` (`parent_id`),
  KEY `SALES_PAYMENT_TRANSACTION_PAYMENT_ID` (`payment_id`),
  CONSTRAINT `FK_B99FF1A06402D725EBDB0F3A7ECD47A2` FOREIGN KEY (`parent_id`) REFERENCES `sales_payment_transaction` (`transaction_id`) ON DELETE CASCADE,
  CONSTRAINT `SALES_PAYMENT_TRANSACTION_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `SALES_PAYMENT_TRANSACTION_PAYMENT_ID_SALES_ORDER_PAYMENT_ENTT_ID` FOREIGN KEY (`payment_id`) REFERENCES `sales_order_payment` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Payment Transaction';

--
-- Dumping data for table `sales_payment_transaction`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_payment_transaction_after_insert` AFTER INSERT ON `sales_payment_transaction` FOR EACH ROW BEGIN
INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`order_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_payment_transaction_after_update` AFTER UPDATE ON `sales_payment_transaction` FOR EACH ROW BEGIN
IF (NOT(NEW.`transaction_id` <=> OLD.`transaction_id`) OR NOT(NEW.`parent_id` <=> OLD.`parent_id`) OR NOT(NEW.`order_id` <=> OLD.`order_id`) OR NOT(NEW.`payment_id` <=> OLD.`payment_id`) OR NOT(NEW.`txn_id` <=> OLD.`txn_id`) OR NOT(NEW.`parent_txn_id` <=> OLD.`parent_txn_id`) OR NOT(NEW.`txn_type` <=> OLD.`txn_type`) OR NOT(NEW.`is_closed` <=> OLD.`is_closed`) OR NOT(NEW.`additional_information` <=> OLD.`additional_information`) OR NOT(NEW.`created_at` <=> OLD.`created_at`)) THEN INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`order_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_sales_payment_transaction_after_delete` AFTER DELETE ON `sales_payment_transaction` FOR EACH ROW BEGIN
INSERT IGNORE INTO `sales_order_data_exporter_cl` (`entity_id`) VALUES (OLD.`order_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `sales_refunded_aggregated`
--

CREATE TABLE `sales_refunded_aggregated` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `orders_count` int NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `refunded` decimal(20,4) DEFAULT NULL COMMENT 'Refunded',
  `online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Online Refunded',
  `offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Offline Refunded',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_REFUNDED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_REFUNDED_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_REFUNDED_AGGREGATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Refunded Aggregated';

--
-- Dumping data for table `sales_refunded_aggregated`
--


--
-- Table structure for table `sales_refunded_aggregated_order`
--

CREATE TABLE `sales_refunded_aggregated_order` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `orders_count` int NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `refunded` decimal(20,4) DEFAULT NULL COMMENT 'Refunded',
  `online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Online Refunded',
  `offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Offline Refunded',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_REFUNDED_AGGREGATED_ORDER_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `SALES_REFUNDED_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_REFUNDED_AGGREGATED_ORDER_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Refunded Aggregated Order';

--
-- Dumping data for table `sales_refunded_aggregated_order`
--


--
-- Table structure for table `sales_sequence_meta`
--

CREATE TABLE `sales_sequence_meta` (
  `meta_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `entity_type` varchar(32) NOT NULL COMMENT 'Prefix',
  `store_id` smallint unsigned NOT NULL COMMENT 'Store ID',
  `sequence_table` varchar(64) NOT NULL COMMENT 'table for sequence',
  PRIMARY KEY (`meta_id`),
  UNIQUE KEY `SALES_SEQUENCE_META_ENTITY_TYPE_STORE_ID` (`entity_type`,`store_id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb3 COMMENT='sales_sequence_meta';

--
-- Dumping data for table `sales_sequence_meta`
--

INSERT INTO `sales_sequence_meta` VALUES (1,'order',0,'sequence_order_0'),(2,'invoice',0,'sequence_invoice_0'),(3,'creditmemo',0,'sequence_creditmemo_0'),(4,'shipment',0,'sequence_shipment_0'),(5,'order',1,'sequence_order_1'),(6,'invoice',1,'sequence_invoice_1'),(7,'creditmemo',1,'sequence_creditmemo_1'),(8,'shipment',1,'sequence_shipment_1'),(9,'order',2,'sequence_order_2'),(10,'invoice',2,'sequence_invoice_2'),(11,'creditmemo',2,'sequence_creditmemo_2'),(12,'shipment',2,'sequence_shipment_2'),(13,'order',3,'sequence_order_3'),(14,'invoice',3,'sequence_invoice_3'),(15,'creditmemo',3,'sequence_creditmemo_3'),(16,'shipment',3,'sequence_shipment_3'),(17,'order',4,'sequence_order_4'),(18,'invoice',4,'sequence_invoice_4'),(19,'creditmemo',4,'sequence_creditmemo_4'),(20,'shipment',4,'sequence_shipment_4'),(21,'order',5,'sequence_order_5'),(22,'invoice',5,'sequence_invoice_5'),(23,'creditmemo',5,'sequence_creditmemo_5'),(24,'shipment',5,'sequence_shipment_5'),(25,'order',6,'sequence_order_6'),(26,'invoice',6,'sequence_invoice_6'),(27,'creditmemo',6,'sequence_creditmemo_6'),(28,'shipment',6,'sequence_shipment_6');

--
-- Table structure for table `sales_sequence_profile`
--

CREATE TABLE `sales_sequence_profile` (
  `profile_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `meta_id` int unsigned NOT NULL COMMENT 'Meta_id',
  `prefix` varchar(32) DEFAULT NULL COMMENT 'Prefix',
  `suffix` varchar(32) DEFAULT NULL COMMENT 'Suffix',
  `start_value` int unsigned NOT NULL DEFAULT '1' COMMENT 'Start value for sequence',
  `step` int unsigned NOT NULL DEFAULT '1' COMMENT 'Step for sequence',
  `max_value` int unsigned NOT NULL COMMENT 'MaxValue for sequence',
  `warning_value` int unsigned NOT NULL COMMENT 'WarningValue for sequence',
  `is_active` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'isActive flag',
  PRIMARY KEY (`profile_id`),
  UNIQUE KEY `SALES_SEQUENCE_PROFILE_META_ID_PREFIX_SUFFIX` (`meta_id`,`prefix`,`suffix`),
  CONSTRAINT `SALES_SEQUENCE_PROFILE_META_ID_SALES_SEQUENCE_META_META_ID` FOREIGN KEY (`meta_id`) REFERENCES `sales_sequence_meta` (`meta_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb3 COMMENT='sales_sequence_profile';

--
-- Dumping data for table `sales_sequence_profile`
--

INSERT INTO `sales_sequence_profile` VALUES (1,1,NULL,NULL,1,1,4294967295,4294966295,1),(2,2,NULL,NULL,1,1,4294967295,4294966295,1),(3,3,NULL,NULL,1,1,4294967295,4294966295,1),(4,4,NULL,NULL,1,1,4294967295,4294966295,1),(5,5,NULL,NULL,1,1,4294967295,4294966295,1),(6,6,NULL,NULL,1,1,4294967295,4294966295,1),(7,7,NULL,NULL,1,1,4294967295,4294966295,1),(8,8,NULL,NULL,1,1,4294967295,4294966295,1),(9,9,'2',NULL,1,1,4294967295,4294966295,1),(10,10,'2',NULL,1,1,4294967295,4294966295,1),(11,11,'2',NULL,1,1,4294967295,4294966295,1),(12,12,'2',NULL,1,1,4294967295,4294966295,1),(13,13,'3',NULL,1,1,4294967295,4294966295,1),(14,14,'3',NULL,1,1,4294967295,4294966295,1),(15,15,'3',NULL,1,1,4294967295,4294966295,1),(16,16,'3',NULL,1,1,4294967295,4294966295,1),(17,17,'4',NULL,1,1,4294967295,4294966295,1),(18,18,'4',NULL,1,1,4294967295,4294966295,1),(19,19,'4',NULL,1,1,4294967295,4294966295,1),(20,20,'4',NULL,1,1,4294967295,4294966295,1),(21,21,'5',NULL,1,1,4294967295,4294966295,1),(22,22,'5',NULL,1,1,4294967295,4294966295,1),(23,23,'5',NULL,1,1,4294967295,4294966295,1),(24,24,'5',NULL,1,1,4294967295,4294966295,1),(25,25,'6',NULL,1,1,4294967295,4294966295,1),(26,26,'6',NULL,1,1,4294967295,4294966295,1),(27,27,'6',NULL,1,1,4294967295,4294966295,1),(28,28,'6',NULL,1,1,4294967295,4294966295,1);

--
-- Table structure for table `sales_shipment`
--

CREATE TABLE `sales_shipment` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `total_weight` decimal(12,4) DEFAULT NULL COMMENT 'Total Weight',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `email_sent` smallint unsigned DEFAULT NULL COMMENT 'Email Sent',
  `send_email` smallint unsigned DEFAULT NULL COMMENT 'Send Email',
  `order_id` int unsigned NOT NULL COMMENT 'Order ID',
  `customer_id` int DEFAULT NULL COMMENT 'Customer ID',
  `shipping_address_id` int DEFAULT NULL COMMENT 'Shipping Address ID',
  `billing_address_id` int DEFAULT NULL COMMENT 'Billing Address ID',
  `shipment_status` int DEFAULT NULL COMMENT 'Shipment Status',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `packages` text COMMENT 'Packed Products in Packages',
  `shipping_label` mediumblob COMMENT 'Shipping Label Content',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  `mollie_shipment_id` varchar(255) DEFAULT NULL COMMENT 'Mollie Shipment Id',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_SHIPMENT_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_SHIPMENT_STORE_ID` (`store_id`),
  KEY `SALES_SHIPMENT_TOTAL_QTY` (`total_qty`),
  KEY `SALES_SHIPMENT_ORDER_ID` (`order_id`),
  KEY `SALES_SHIPMENT_CREATED_AT` (`created_at`),
  KEY `SALES_SHIPMENT_UPDATED_AT` (`updated_at`),
  KEY `SALES_SHIPMENT_SEND_EMAIL` (`send_email`),
  KEY `SALES_SHIPMENT_EMAIL_SENT` (`email_sent`),
  KEY `SALES_SHIPMENT_MOLLIE_SHIPMENT_ID` (`mollie_shipment_id`),
  CONSTRAINT `SALES_SHIPMENT_ORDER_ID_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `sales_order` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `SALES_SHIPMENT_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Shipment';

--
-- Dumping data for table `sales_shipment`
--

INSERT INTO `sales_shipment` VALUES (1,1,NULL,1.0000,NULL,NULL,1,NULL,1,2,NULL,'000000001','2025-01-14 09:42:27','2025-01-14 09:42:27','[]',NULL,NULL,NULL,NULL),(2,1,NULL,1.0000,NULL,NULL,4,NULL,7,8,NULL,'000000002','2025-01-29 15:56:59','2025-01-29 15:56:59','[]',NULL,NULL,NULL,NULL);

--
-- Table structure for table `sales_shipment_comment`
--

CREATE TABLE `sales_shipment_comment` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `is_customer_notified` int DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_SHIPMENT_COMMENT_CREATED_AT` (`created_at`),
  KEY `SALES_SHIPMENT_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `SALES_SHIPMENT_COMMENT_PARENT_ID_SALES_SHIPMENT_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_shipment` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Shipment Comment';

--
-- Dumping data for table `sales_shipment_comment`
--


--
-- Table structure for table `sales_shipment_grid`
--

CREATE TABLE `sales_shipment_grid` (
  `entity_id` int unsigned NOT NULL COMMENT 'Entity ID',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_increment_id` varchar(32) NOT NULL COMMENT 'Order Increment ID',
  `order_id` int unsigned NOT NULL COMMENT 'Order ID',
  `order_created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Order Increment ID',
  `customer_name` varchar(128) NOT NULL COMMENT 'Customer Name',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `shipment_status` int DEFAULT NULL COMMENT 'Shipment Status',
  `order_status` varchar(32) DEFAULT NULL COMMENT 'Order',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `billing_name` varchar(128) DEFAULT NULL COMMENT 'Billing Name',
  `shipping_name` varchar(128) DEFAULT NULL COMMENT 'Shipping Name',
  `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` int DEFAULT NULL,
  `payment_method` varchar(32) DEFAULT NULL COMMENT 'Payment Method',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `SALES_SHIPMENT_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `SALES_SHIPMENT_GRID_STORE_ID` (`store_id`),
  KEY `SALES_SHIPMENT_GRID_TOTAL_QTY` (`total_qty`),
  KEY `SALES_SHIPMENT_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `SALES_SHIPMENT_GRID_SHIPMENT_STATUS` (`shipment_status`),
  KEY `SALES_SHIPMENT_GRID_ORDER_STATUS` (`order_status`),
  KEY `SALES_SHIPMENT_GRID_CREATED_AT` (`created_at`),
  KEY `SALES_SHIPMENT_GRID_UPDATED_AT` (`updated_at`),
  KEY `SALES_SHIPMENT_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `SALES_SHIPMENT_GRID_SHIPPING_NAME` (`shipping_name`),
  KEY `SALES_SHIPMENT_GRID_BILLING_NAME` (`billing_name`),
  KEY `SALES_SHIPMENT_GRID_ORDER_ID` (`order_id`),
  FULLTEXT KEY `FTI_086B40C8955F167B8EA76653437879B4` (`increment_id`,`order_increment_id`,`shipping_name`,`customer_name`,`customer_email`,`billing_address`,`shipping_address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Shipment Grid';

--
-- Dumping data for table `sales_shipment_grid`
--

INSERT INTO `sales_shipment_grid` VALUES (1,'000000001',1,'000000003',1,'2025-01-07 13:54:08','Muhammad  Zohaib',1.0000,NULL,'processing','Banyo,89/A,London,Guam,12345 12345','Banyo,89/A,London,Guam,12345 12345','Muhammad  Zohaib','Muhammad  Zohaib','zohaibmuhammad23@gmail.com',0,'checkmo','Flat Rate - Fixed','2025-01-14 09:42:27','2025-01-14 09:42:27'),(2,'000000002',1,'000000005-1',4,'2025-01-29 15:54:40','Test zohaib',1.0000,NULL,'processing','Banyo,sasas,London,Guam,123456','Banyo,sasas,London,Guam,123456','Test zohaib','Test zohaib','zohaibmuhammad23@gmail.com',0,'adminpaymentmethod','Van Delivery - Shipping Test','2025-01-29 15:56:59','2025-01-29 15:56:59');

--
-- Table structure for table `sales_shipment_item`
--

CREATE TABLE `sales_shipment_item` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `row_total` decimal(20,4) DEFAULT NULL COMMENT 'Row Total',
  `price` decimal(20,4) DEFAULT NULL COMMENT 'Price',
  `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `product_id` int DEFAULT NULL COMMENT 'Product ID',
  `order_item_id` int DEFAULT NULL COMMENT 'Order Item ID',
  `additional_data` text COMMENT 'Additional Data',
  `description` text COMMENT 'Description',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_SHIPMENT_ITEM_PARENT_ID` (`parent_id`),
  CONSTRAINT `SALES_SHIPMENT_ITEM_PARENT_ID_SALES_SHIPMENT_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_shipment` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Shipment Item';

--
-- Dumping data for table `sales_shipment_item`
--

INSERT INTO `sales_shipment_item` VALUES (1,1,NULL,860.0000,NULL,1.0000,4894,1,NULL,NULL,'Franke 800 Hood FVAS A80 BK/2 Voice, App, & Remote Control','FVAS A80 BK Z1'),(2,2,NULL,349.9900,NULL,1.0000,1162,4,NULL,NULL,'Reginox Comfort Colorado L Integrated 1 Bowl Kitchen Sink','Reginox Comfort Colorado L Integrated 1 Bowl Kitchen Sink');

--
-- Table structure for table `sales_shipment_track`
--

CREATE TABLE `sales_shipment_track` (
  `entity_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int unsigned NOT NULL COMMENT 'Parent ID',
  `weight` decimal(12,4) DEFAULT NULL COMMENT 'Weight',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `order_id` int unsigned NOT NULL COMMENT 'Order ID',
  `track_number` text COMMENT 'Number',
  `description` text COMMENT 'Description',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  `carrier_code` varchar(32) DEFAULT NULL COMMENT 'Carrier Code',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`),
  KEY `SALES_SHIPMENT_TRACK_PARENT_ID` (`parent_id`),
  KEY `SALES_SHIPMENT_TRACK_ORDER_ID` (`order_id`),
  KEY `SALES_SHIPMENT_TRACK_CREATED_AT` (`created_at`),
  CONSTRAINT `SALES_SHIPMENT_TRACK_PARENT_ID_SALES_SHIPMENT_ENTITY_ID` FOREIGN KEY (`parent_id`) REFERENCES `sales_shipment` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Shipment Track';

--
-- Dumping data for table `sales_shipment_track`
--


--
-- Table structure for table `sales_shipping_aggregated`
--

CREATE TABLE `sales_shipping_aggregated` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `orders_count` int NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_shipping` decimal(20,4) DEFAULT NULL COMMENT 'Total Shipping',
  `total_shipping_actual` decimal(20,4) DEFAULT NULL COMMENT 'Total Shipping Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALES_SHPP_AGGRED_PERIOD_STORE_ID_ORDER_STS_SHPP_DESCRIPTION` (`period`,`store_id`,`order_status`,`shipping_description`),
  KEY `SALES_SHIPPING_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_SHIPPING_AGGREGATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Shipping Aggregated';

--
-- Dumping data for table `sales_shipping_aggregated`
--


--
-- Table structure for table `sales_shipping_aggregated_order`
--

CREATE TABLE `sales_shipping_aggregated_order` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `orders_count` int NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_shipping` decimal(20,4) DEFAULT NULL COMMENT 'Total Shipping',
  `total_shipping_actual` decimal(20,4) DEFAULT NULL COMMENT 'Total Shipping Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_C05FAE47282EEA68654D0924E946761F` (`period`,`store_id`,`order_status`,`shipping_description`),
  KEY `SALES_SHIPPING_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `SALES_SHIPPING_AGGREGATED_ORDER_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Shipping Aggregated Order';

--
-- Dumping data for table `sales_shipping_aggregated_order`
--


--
-- Table structure for table `salesrule`
--

CREATE TABLE `salesrule` (
  `rule_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `description` text COMMENT 'Description',
  `from_date` date DEFAULT NULL COMMENT 'From',
  `to_date` date DEFAULT NULL COMMENT 'To',
  `uses_per_customer` int NOT NULL DEFAULT '0' COMMENT 'Uses Per Customer',
  `is_active` smallint NOT NULL DEFAULT '0' COMMENT 'Is Active',
  `conditions_serialized` mediumtext COMMENT 'Conditions Serialized',
  `actions_serialized` mediumtext COMMENT 'Actions Serialized',
  `stop_rules_processing` smallint NOT NULL DEFAULT '1' COMMENT 'Stop Rules Processing',
  `is_advanced` smallint unsigned NOT NULL DEFAULT '1' COMMENT 'Is Advanced',
  `product_ids` text COMMENT 'Product Ids',
  `sort_order` int unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `simple_action` varchar(32) DEFAULT NULL COMMENT 'Simple Action',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `discount_qty` decimal(12,4) DEFAULT NULL COMMENT 'Discount Qty',
  `discount_step` int unsigned NOT NULL DEFAULT '0' COMMENT 'Discount Step',
  `apply_to_shipping` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Apply To Shipping',
  `times_used` int unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  `is_rss` smallint NOT NULL DEFAULT '0' COMMENT 'Is Rss',
  `coupon_type` smallint unsigned NOT NULL DEFAULT '1' COMMENT 'Coupon Type',
  `use_auto_generation` smallint NOT NULL DEFAULT '0' COMMENT 'Use Auto Generation',
  `uses_per_coupon` int NOT NULL DEFAULT '0' COMMENT 'User Per Coupon',
  `simple_free_shipping` smallint unsigned DEFAULT NULL COMMENT 'Simple Free Shipping',
  PRIMARY KEY (`rule_id`),
  KEY `SALESRULE_IS_ACTIVE_SORT_ORDER_TO_DATE_FROM_DATE` (`is_active`,`sort_order`,`to_date`,`from_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Salesrule';

--
-- Dumping data for table `salesrule`
--


--
-- Table structure for table `salesrule_coupon`
--

CREATE TABLE `salesrule_coupon` (
  `coupon_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Coupon ID',
  `rule_id` int unsigned NOT NULL COMMENT 'Rule ID',
  `code` varchar(255) DEFAULT NULL COMMENT 'Code',
  `usage_limit` int unsigned DEFAULT NULL COMMENT 'Usage Limit',
  `usage_per_customer` int unsigned DEFAULT NULL COMMENT 'Usage Per Customer',
  `times_used` int unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  `expiration_date` datetime DEFAULT NULL COMMENT 'Expiration Date',
  `is_primary` smallint unsigned DEFAULT NULL COMMENT 'Is Primary',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Coupon Code Creation Date',
  `type` smallint DEFAULT '0' COMMENT 'Coupon Code Type',
  PRIMARY KEY (`coupon_id`),
  UNIQUE KEY `SALESRULE_COUPON_CODE` (`code`),
  UNIQUE KEY `SALESRULE_COUPON_RULE_ID_IS_PRIMARY` (`rule_id`,`is_primary`),
  KEY `SALESRULE_COUPON_RULE_ID` (`rule_id`),
  CONSTRAINT `SALESRULE_COUPON_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Salesrule Coupon';

--
-- Dumping data for table `salesrule_coupon`
--


--
-- Table structure for table `salesrule_coupon_aggregated`
--

CREATE TABLE `salesrule_coupon_aggregated` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date NOT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `coupon_code` varchar(50) DEFAULT NULL COMMENT 'Coupon Code',
  `coupon_uses` int NOT NULL DEFAULT '0' COMMENT 'Coupon Uses',
  `subtotal_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `total_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount',
  `subtotal_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount Actual',
  `discount_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount Actual',
  `total_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount Actual',
  `rule_name` varchar(255) DEFAULT NULL COMMENT 'Rule Name',
  PRIMARY KEY (`id`),
  UNIQUE KEY `SALESRULE_COUPON_AGGRED_PERIOD_STORE_ID_ORDER_STS_COUPON_CODE` (`period`,`store_id`,`order_status`,`coupon_code`),
  KEY `SALESRULE_COUPON_AGGREGATED_STORE_ID` (`store_id`),
  KEY `SALESRULE_COUPON_AGGREGATED_RULE_NAME` (`rule_name`),
  CONSTRAINT `SALESRULE_COUPON_AGGREGATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Coupon Aggregated';

--
-- Dumping data for table `salesrule_coupon_aggregated`
--


--
-- Table structure for table `salesrule_coupon_aggregated_order`
--

CREATE TABLE `salesrule_coupon_aggregated_order` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date NOT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `coupon_code` varchar(50) DEFAULT NULL COMMENT 'Coupon Code',
  `coupon_uses` int NOT NULL DEFAULT '0' COMMENT 'Coupon Uses',
  `subtotal_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `total_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount',
  `rule_name` varchar(255) DEFAULT NULL COMMENT 'Rule Name',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_1094D1FBBCBB11704A29DEF3ACC37D2B` (`period`,`store_id`,`order_status`,`coupon_code`),
  KEY `SALESRULE_COUPON_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  KEY `SALESRULE_COUPON_AGGREGATED_ORDER_RULE_NAME` (`rule_name`),
  CONSTRAINT `SALESRULE_COUPON_AGGREGATED_ORDER_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Coupon Aggregated Order';

--
-- Dumping data for table `salesrule_coupon_aggregated_order`
--


--
-- Table structure for table `salesrule_coupon_aggregated_updated`
--

CREATE TABLE `salesrule_coupon_aggregated_updated` (
  `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date NOT NULL COMMENT 'Period',
  `store_id` smallint unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `coupon_code` varchar(50) DEFAULT NULL COMMENT 'Coupon Code',
  `coupon_uses` int NOT NULL DEFAULT '0' COMMENT 'Coupon Uses',
  `subtotal_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `total_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount',
  `subtotal_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount Actual',
  `discount_amount_actual` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount Actual',
  `total_amount_actual` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount Actual',
  `rule_name` varchar(255) DEFAULT NULL COMMENT 'Rule Name',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_7196FA120A4F0F84E1B66605E87E213E` (`period`,`store_id`,`order_status`,`coupon_code`),
  KEY `SALESRULE_COUPON_AGGREGATED_UPDATED_STORE_ID` (`store_id`),
  KEY `SALESRULE_COUPON_AGGREGATED_UPDATED_RULE_NAME` (`rule_name`),
  CONSTRAINT `SALESRULE_COUPON_AGGREGATED_UPDATED_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Salesrule Coupon Aggregated Updated';

--
-- Dumping data for table `salesrule_coupon_aggregated_updated`
--


--
-- Table structure for table `salesrule_coupon_usage`
--

CREATE TABLE `salesrule_coupon_usage` (
  `coupon_id` int unsigned NOT NULL COMMENT 'Coupon ID',
  `customer_id` int unsigned NOT NULL COMMENT 'Customer ID',
  `times_used` int unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  PRIMARY KEY (`coupon_id`,`customer_id`),
  KEY `SALESRULE_COUPON_USAGE_CUSTOMER_ID` (`customer_id`),
  CONSTRAINT `SALESRULE_COUPON_USAGE_COUPON_ID_SALESRULE_COUPON_COUPON_ID` FOREIGN KEY (`coupon_id`) REFERENCES `salesrule_coupon` (`coupon_id`) ON DELETE CASCADE,
  CONSTRAINT `SALESRULE_COUPON_USAGE_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Salesrule Coupon Usage';

--
-- Dumping data for table `salesrule_coupon_usage`
--


--
-- Table structure for table `salesrule_customer`
--

CREATE TABLE `salesrule_customer` (
  `rule_customer_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule Customer ID',
  `rule_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Rule ID',
  `customer_id` int unsigned NOT NULL DEFAULT '0' COMMENT 'Customer ID',
  `times_used` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  PRIMARY KEY (`rule_customer_id`),
  KEY `SALESRULE_CUSTOMER_RULE_ID_CUSTOMER_ID` (`rule_id`,`customer_id`),
  KEY `SALESRULE_CUSTOMER_CUSTOMER_ID_RULE_ID` (`customer_id`,`rule_id`),
  CONSTRAINT `SALESRULE_CUSTOMER_CUSTOMER_ID_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `SALESRULE_CUSTOMER_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Salesrule Customer';

--
-- Dumping data for table `salesrule_customer`
--


--
-- Table structure for table `salesrule_customer_group`
--

CREATE TABLE `salesrule_customer_group` (
  `rule_id` int unsigned NOT NULL COMMENT 'Rule ID',
  `customer_group_id` int unsigned NOT NULL COMMENT 'Customer Group ID',
  PRIMARY KEY (`rule_id`,`customer_group_id`),
  KEY `SALESRULE_CUSTOMER_GROUP_CUSTOMER_GROUP_ID` (`customer_group_id`),
  CONSTRAINT `SALESRULE_CSTR_GROUP_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID` FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE,
  CONSTRAINT `SALESRULE_CUSTOMER_GROUP_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Rules To Customer Groups Relations';

--
-- Dumping data for table `salesrule_customer_group`
--


--
-- Table structure for table `salesrule_label`
--

CREATE TABLE `salesrule_label` (
  `label_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Label ID',
  `rule_id` int unsigned NOT NULL COMMENT 'Rule ID',
  `store_id` smallint unsigned NOT NULL COMMENT 'Store ID',
  `label` varchar(255) DEFAULT NULL COMMENT 'Label',
  PRIMARY KEY (`label_id`),
  UNIQUE KEY `SALESRULE_LABEL_RULE_ID_STORE_ID` (`rule_id`,`store_id`),
  KEY `SALESRULE_LABEL_STORE_ID` (`store_id`),
  CONSTRAINT `SALESRULE_LABEL_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE,
  CONSTRAINT `SALESRULE_LABEL_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Salesrule Label';

--
-- Dumping data for table `salesrule_label`
--


--
-- Table structure for table `salesrule_product_attribute`
--

CREATE TABLE `salesrule_product_attribute` (
  `rule_id` int unsigned NOT NULL COMMENT 'Rule ID',
  `website_id` smallint unsigned NOT NULL COMMENT 'Website ID',
  `customer_group_id` int unsigned NOT NULL COMMENT 'Customer Group ID',
  `attribute_id` smallint unsigned NOT NULL COMMENT 'Attribute ID',
  PRIMARY KEY (`rule_id`,`website_id`,`customer_group_id`,`attribute_id`),
  KEY `SALESRULE_PRODUCT_ATTRIBUTE_WEBSITE_ID` (`website_id`),
  KEY `SALESRULE_PRODUCT_ATTRIBUTE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `SALESRULE_PRODUCT_ATTRIBUTE_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `SALESRULE_PRD_ATTR_ATTR_ID_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `SALESRULE_PRD_ATTR_CSTR_GROUP_ID_CSTR_GROUP_CSTR_GROUP_ID` FOREIGN KEY (`customer_group_id`) REFERENCES `customer_group` (`customer_group_id`) ON DELETE CASCADE,
  CONSTRAINT `SALESRULE_PRODUCT_ATTRIBUTE_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE,
  CONSTRAINT `SALESRULE_PRODUCT_ATTRIBUTE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Salesrule Product Attribute';

--
-- Dumping data for table `salesrule_product_attribute`
--


--
-- Table structure for table `salesrule_website`
--

CREATE TABLE `salesrule_website` (
  `rule_id` int unsigned NOT NULL COMMENT 'Rule ID',
  `website_id` smallint unsigned NOT NULL COMMENT 'Website ID',
  PRIMARY KEY (`rule_id`,`website_id`),
  KEY `SALESRULE_WEBSITE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `SALESRULE_WEBSITE_RULE_ID_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `salesrule` (`rule_id`) ON DELETE CASCADE,
  CONSTRAINT `SALESRULE_WEBSITE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Rules To Websites Relations';

--
-- Dumping data for table `salesrule_website`
--


--
-- Table structure for table `search_query`
--

CREATE TABLE `search_query` (
  `query_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Query ID',
  `query_text` varchar(255) DEFAULT NULL COMMENT 'Query text',
  `num_results` int unsigned NOT NULL DEFAULT '0' COMMENT 'Num results',
  `popularity` int unsigned NOT NULL DEFAULT '0' COMMENT 'Popularity',
  `redirect` varchar(255) DEFAULT NULL COMMENT 'Redirect',
  `store_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `display_in_terms` smallint NOT NULL DEFAULT '1' COMMENT 'Display in terms',
  `is_active` smallint DEFAULT '1' COMMENT 'Active status',
  `is_processed` smallint DEFAULT '0' COMMENT 'Processed status',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated at',
  PRIMARY KEY (`query_id`),
  UNIQUE KEY `SEARCH_QUERY_QUERY_TEXT_STORE_ID` (`query_text`,`store_id`),
  KEY `SEARCH_QUERY_QUERY_TEXT_STORE_ID_POPULARITY` (`query_text`,`store_id`,`popularity`),
  KEY `SEARCH_QUERY_IS_PROCESSED` (`is_processed`),
  KEY `SEARCH_QUERY_STORE_ID_NUM_RESULTS_POPULARITY` (`store_id`,`num_results`,`popularity`),
  CONSTRAINT `SEARCH_QUERY_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=371 DEFAULT CHARSET=utf8mb3 COMMENT='Search query table';

--
-- Dumping data for table `search_query`
--

INSERT INTO `search_query` VALUES (1,'gear',0,2,NULL,1,1,1,0,'2024-08-15 10:04:31'),(5,'24-WG085',0,2,NULL,1,1,1,0,'2024-08-15 11:57:24'),(9,'1080-000',0,1,NULL,1,1,1,0,'2024-08-15 11:57:41'),(11,'sdfasdf',0,1,NULL,1,1,1,0,'2024-08-15 11:57:45'),(13,'zxcxc',0,1,NULL,1,1,1,0,'2024-08-15 12:00:14'),(15,'24-w',0,1,NULL,1,1,1,0,'2024-08-16 10:01:47'),(17,'hello',0,5,NULL,1,1,1,0,'2024-08-27 10:49:58'),(25,'Amur',0,2,NULL,1,1,1,0,'2024-08-22 06:44:07'),(29,'accur',0,2,NULL,1,1,1,0,'2024-08-22 06:44:24'),(31,'allur',0,1,NULL,1,1,1,0,'2024-08-22 06:44:13'),(37,'sink',488,1,NULL,1,1,1,0,'2024-08-29 06:19:47'),(39,'texa configurable',148,1,NULL,1,1,1,0,'2024-08-29 09:52:35'),(41,'test-configurable',224,1,NULL,1,1,1,0,'2024-09-02 11:59:28'),(47,'configurable',144,1,NULL,1,1,1,0,'2024-08-29 09:56:32'),(52,'xdffhh',0,1,NULL,1,1,1,0,'2024-09-04 08:21:13'),(55,'test',0,3,NULL,1,1,1,0,'2025-02-25 11:44:37'),(65,'yoga',6,1,NULL,1,1,1,0,'2024-09-21 05:55:45'),(68,'sprite',6,17,NULL,1,1,1,0,'2024-09-21 07:37:06'),(114,'test-con',81,1,NULL,1,1,1,0,'2024-09-27 11:13:49'),(116,'tey',0,2,NULL,1,1,1,0,'2024-10-09 10:30:28'),(129,'bathroom',863,1,NULL,1,1,1,0,'2024-11-05 10:38:29'),(132,'bett',149,2,NULL,1,1,1,0,'2024-11-05 11:23:17'),(135,'regionx',0,3,NULL,1,1,1,0,'2024-11-12 10:49:42'),(137,'reginox',97,2,NULL,1,1,1,0,'2025-02-14 06:22:20'),(178,'flame',424,1,NULL,1,1,1,0,'2024-12-09 12:06:50'),(181,'dru',126,1,NULL,1,1,1,0,'2025-01-06 08:54:36'),(183,'test-product',0,1,NULL,3,1,1,0,'2025-02-01 05:36:26'),(185,'Franke Mythos MYX 110-34 Undermount Single Bowl Sink -Stainless Steel',212,1,NULL,1,1,1,0,'2025-02-03 08:29:13'),(188,'122.0606.948',1,4,NULL,1,1,1,0,'2025-02-03 08:57:00'),(190,'123',1,1,NULL,1,1,1,0,'2025-02-03 08:37:39'),(196,'122.0606.948',0,1,NULL,3,1,1,0,'2025-02-03 08:41:40'),(199,'122',5,1,NULL,1,1,1,0,'2025-02-03 08:54:28'),(202,'120',5,1,NULL,1,1,1,0,'2025-02-03 08:54:33'),(206,'ZIA XL 6 S Compact',81,1,NULL,1,1,1,0,'2025-02-03 09:08:57'),(208,'Reginox Comfort Colorado L<br> Integrated 1 Bowl Kitchen Sink',407,1,NULL,1,1,1,0,'2025-02-06 09:43:45'),(210,'Reginox Comfort Colorado Integrated 1 Bowl Kitchen Sink',19,1,NULL,3,1,1,0,'2025-02-06 09:44:45'),(213,'products',0,1,NULL,1,1,1,0,'2025-02-10 11:37:43'),(215,'cus',0,1,NULL,1,1,1,0,'2025-02-10 11:37:54'),(217,'456449',0,2,NULL,1,1,1,0,'2025-02-10 11:39:20'),(221,'456449',0,1,NULL,3,1,1,0,'2025-02-10 11:40:50'),(223,'ECLIPSE',3,4,NULL,3,1,1,0,'2025-02-10 13:03:38'),(227,'https://hyva-staging.nexus-home.com',0,3,NULL,1,1,1,0,'2025-02-10 12:46:36'),(235,'sss',0,5,NULL,1,1,1,0,'2025-02-10 12:50:59'),(245,'asa',0,3,NULL,1,1,1,0,'2025-02-10 12:57:17'),(251,'ssss',0,2,NULL,3,1,1,0,'2025-02-10 12:59:53'),(255,'ECLIPSE',3,1,NULL,1,1,1,0,'2025-02-10 13:03:35'),(259,'16ECL088005000339',0,1,NULL,1,1,1,0,'2025-02-10 13:07:16'),(261,'Ebony',1,1,NULL,1,1,1,0,'2025-02-10 13:07:57'),(263,'Ebony',1,1,NULL,3,1,1,0,'2025-02-10 13:08:14'),(265,'Bette Classic',316,1,NULL,1,1,1,0,'2025-02-10 13:45:44'),(267,'Bette Classic',227,1,NULL,3,1,1,0,'2025-02-10 13:45:46'),(270,'D57MH56N0B',1,1,NULL,1,1,1,0,'2025-02-10 13:53:44'),(272,'Matki-CLL',71,1,NULL,1,1,1,0,'2025-02-10 13:55:27'),(274,'Matki-CLL',70,1,NULL,3,1,1,0,'2025-02-10 13:55:29'),(276,'blanco',250,1,NULL,1,1,1,0,'2025-02-10 16:48:14'),(279,'blanco set outlet',1287,1,NULL,1,1,1,0,'2025-02-10 16:49:22'),(281,'203477',1,1,NULL,3,1,1,0,'2025-02-10 16:49:46'),(286,'CECS',0,4,NULL,1,1,1,0,'2025-02-11 09:06:54'),(294,'526560 Full Test',0,1,NULL,1,1,1,0,'2025-02-25 11:32:19'),(297,'Blanco Tampera 3-n-1 Drink Hot Boiling Kitchen Tap - Testing Product.',2833,1,NULL,1,1,1,0,'2025-02-11 09:16:21'),(300,'BXX 110 16',203,1,NULL,1,1,1,0,'2025-02-11 10:58:16'),(302,'box 110 16',245,1,NULL,3,1,1,0,'2025-02-11 11:10:40'),(305,'Blanco Vicus Bridge Double Lever Kitchen Sink Mixer Tap',1911,1,NULL,1,1,1,0,'2025-02-11 12:48:13'),(307,'blanco vicus bridge double lever kitchen siru mixer tap',1906,1,NULL,1,1,1,0,'2025-02-11 12:48:14'),(309,'Vicus Bridge Double Lever',871,1,NULL,1,1,1,0,'2025-02-11 13:09:17'),(311,'franke',221,1,NULL,1,1,1,0,'2025-02-11 13:22:28'),(315,'Blanco Vicus Bridge Double Lever Kitchen Sink Mixer Tap test 2',2547,1,NULL,1,1,1,0,'2025-02-11 13:30:32'),(318,'test222',0,5,NULL,1,1,1,0,'2025-02-25 11:30:46'),(324,'Vicus Bridge',12,1,NULL,1,1,1,0,'2025-02-11 14:20:49'),(329,'ARX 160',54,1,NULL,1,1,1,0,'2025-02-11 15:35:13'),(335,'BFG 651',13,1,NULL,3,1,1,0,'2025-02-12 11:56:39'),(337,'BFG 651',11,1,NULL,1,1,1,0,'2025-02-12 11:56:45'),(341,'balnco',0,1,NULL,1,1,1,0,'2025-02-12 12:16:03'),(343,'vicus',0,1,NULL,1,1,1,0,'2025-02-25 12:59:04'),(353,'test',0,1,NULL,3,1,1,0,'2025-02-25 11:45:24'),(356,'toielt',0,1,NULL,1,1,1,0,'2025-03-12 05:40:33'),(358,'test-config',0,1,NULL,3,1,1,0,'2025-04-07 13:07:02'),(360,'NTS303',0,1,NULL,1,1,1,0,'2025-04-18 07:21:16'),(362,'NTS010',0,1,NULL,1,1,1,0,'2025-04-18 07:21:36'),(364,'toilet',181,1,NULL,1,1,1,0,'2025-04-22 09:23:37'),(366,'mp18awha rakseat016',1,1,NULL,1,1,1,0,'2025-04-24 09:11:09'),(368,'mp09awha rakseat016',1,1,NULL,1,1,1,0,'2025-04-24 09:11:24');

--
-- Table structure for table `search_synonyms`
--

CREATE TABLE `search_synonyms` (
  `group_id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Synonyms Group ID',
  `synonyms` text NOT NULL COMMENT 'list of synonyms making up this group',
  `store_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID - identifies the store view these synonyms belong to',
  `website_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID - identifies the website ID these synonyms belong to',
  PRIMARY KEY (`group_id`),
  KEY `SEARCH_SYNONYMS_STORE_ID` (`store_id`),
  KEY `SEARCH_SYNONYMS_WEBSITE_ID` (`website_id`),
  FULLTEXT KEY `SEARCH_SYNONYMS_SYNONYMS` (`synonyms`),
  CONSTRAINT `SEARCH_SYNONYMS_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `SEARCH_SYNONYMS_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='table storing various synonyms groups';

--
-- Dumping data for table `search_synonyms`
--


--
-- Table structure for table `sendfriend_log`
--

CREATE TABLE `sendfriend_log` (
  `log_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log ID',
  `ip` bigint unsigned NOT NULL DEFAULT '0' COMMENT 'Customer IP address',
  `time` int unsigned NOT NULL DEFAULT '0' COMMENT 'Log time',
  `website_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  PRIMARY KEY (`log_id`),
  KEY `SENDFRIEND_LOG_IP` (`ip`),
  KEY `SENDFRIEND_LOG_TIME` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Send to friend function log storage table';

--
-- Dumping data for table `sendfriend_log`
--


--
-- Table structure for table `sequence_creditmemo_0`
--

CREATE TABLE `sequence_creditmemo_0` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_creditmemo_0`
--


--
-- Table structure for table `sequence_creditmemo_1`
--

CREATE TABLE `sequence_creditmemo_1` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_creditmemo_1`
--


--
-- Table structure for table `sequence_creditmemo_2`
--

CREATE TABLE `sequence_creditmemo_2` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_creditmemo_2`
--


--
-- Table structure for table `sequence_creditmemo_3`
--

CREATE TABLE `sequence_creditmemo_3` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_creditmemo_3`
--


--
-- Table structure for table `sequence_creditmemo_4`
--

CREATE TABLE `sequence_creditmemo_4` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_creditmemo_4`
--


--
-- Table structure for table `sequence_creditmemo_5`
--

CREATE TABLE `sequence_creditmemo_5` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_creditmemo_5`
--


--
-- Table structure for table `sequence_creditmemo_6`
--

CREATE TABLE `sequence_creditmemo_6` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_creditmemo_6`
--


--
-- Table structure for table `sequence_invoice_0`
--

CREATE TABLE `sequence_invoice_0` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_invoice_0`
--


--
-- Table structure for table `sequence_invoice_1`
--

CREATE TABLE `sequence_invoice_1` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_invoice_1`
--


--
-- Table structure for table `sequence_invoice_2`
--

CREATE TABLE `sequence_invoice_2` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_invoice_2`
--


--
-- Table structure for table `sequence_invoice_3`
--

CREATE TABLE `sequence_invoice_3` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_invoice_3`
--


--
-- Table structure for table `sequence_invoice_4`
--

CREATE TABLE `sequence_invoice_4` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_invoice_4`
--


--
-- Table structure for table `sequence_invoice_5`
--

CREATE TABLE `sequence_invoice_5` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_invoice_5`
--


--
-- Table structure for table `sequence_invoice_6`
--

CREATE TABLE `sequence_invoice_6` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_invoice_6`
--


--
-- Table structure for table `sequence_order_0`
--

CREATE TABLE `sequence_order_0` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_order_0`
--


--
-- Table structure for table `sequence_order_1`
--

CREATE TABLE `sequence_order_1` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_order_1`
--

INSERT INTO `sequence_order_1` VALUES (1),(2),(3),(4),(5),(6),(7);

--
-- Table structure for table `sequence_order_2`
--

CREATE TABLE `sequence_order_2` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_order_2`
--


--
-- Table structure for table `sequence_order_3`
--

CREATE TABLE `sequence_order_3` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_order_3`
--


--
-- Table structure for table `sequence_order_4`
--

CREATE TABLE `sequence_order_4` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_order_4`
--


--
-- Table structure for table `sequence_order_5`
--

CREATE TABLE `sequence_order_5` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_order_5`
--


--
-- Table structure for table `sequence_order_6`
--

CREATE TABLE `sequence_order_6` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_order_6`
--


--
-- Table structure for table `sequence_shipment_0`
--

CREATE TABLE `sequence_shipment_0` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_shipment_0`
--


--
-- Table structure for table `sequence_shipment_1`
--

CREATE TABLE `sequence_shipment_1` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_shipment_1`
--

INSERT INTO `sequence_shipment_1` VALUES (1),(2);

--
-- Table structure for table `sequence_shipment_2`
--

CREATE TABLE `sequence_shipment_2` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_shipment_2`
--


--
-- Table structure for table `sequence_shipment_3`
--

CREATE TABLE `sequence_shipment_3` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_shipment_3`
--


--
-- Table structure for table `sequence_shipment_4`
--

CREATE TABLE `sequence_shipment_4` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_shipment_4`
--


--
-- Table structure for table `sequence_shipment_5`
--

CREATE TABLE `sequence_shipment_5` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_shipment_5`
--


--
-- Table structure for table `sequence_shipment_6`
--

CREATE TABLE `sequence_shipment_6` (
  `sequence_value` int unsigned NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`sequence_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sequence_shipment_6`
--


--
-- Table structure for table `session`
--

CREATE TABLE `session` (
  `session_id` varchar(255) NOT NULL COMMENT 'Session Id',
  `session_expires` int unsigned NOT NULL DEFAULT '0' COMMENT 'Date of Session Expiration',
  `session_data` mediumblob NOT NULL COMMENT 'Session Data',
  PRIMARY KEY (`session_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Database Sessions Storage';

--
-- Dumping data for table `session`
--


--
-- Table structure for table `setup_module`
--

CREATE TABLE `setup_module` (
  `module` varchar(50) NOT NULL COMMENT 'Module',
  `schema_version` varchar(50) DEFAULT NULL COMMENT 'Schema Version',
  `data_version` varchar(50) DEFAULT NULL COMMENT 'Data Version',
  PRIMARY KEY (`module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Module versions registry';

--
-- Dumping data for table `setup_module`
--

INSERT INTO `setup_module` VALUES ('Amasty_CustomTabs','1.2.0','1.2.0'),('Anees_Finalsort','1.0.0','1.0.0'),('Anees_Pricesorting','1.0.0','1.0.0'),('Anees_Work','1.0.3','1.0.3'),('Apptrian_Minify','2.0.4','2.0.4'),('Bss_AdminPaymentMethod','1.0.1','1.0.1'),('Bss_AjaxCart','1.3.1','1.3.1'),('Bss_FBT','1.0.9','1.0.9'),('Bss_HyvaCompatBase','1.0.2','1.0.2'),('Bss_InfiniteScroll','1.1.7','1.1.7'),('Bss_ProductAttachment','1.1.3','1.1.3'),('Bss_ProductLabel','1.1.9','1.1.9'),('Bss_ProductLabelGraphQl','1.0.0','1.0.0'),('Cardstream_PaymentGateway','2.0.1','2.0.1'),('Cisin_Clickforprice','1.0.0','1.0.0'),('Cisin_Salesordergrid','0.0.1','0.0.1'),('CustomCatalog_CategoryTabs','1.0.0','1.0.0'),('Emizentech_Priceslider','0.0.2','0.0.2'),('HTCMage_FixAdminEmailTemplate','1.0.0','1.0.0'),('Hyva_BssAjaxCart','1.0.2','1.0.2'),('Hyva_BssFBT','1.0.0','1.0.0'),('Hyva_BssInfiniteScroll','1.0.1','1.0.1'),('Hyva_BssProductAttachment','1.0.0','1.0.0'),('Hyva_MirasvitAllProducts','0.0.1','0.0.1'),('Hyva_MirasvitBrand','0.0.1','0.0.1'),('Hyva_MirasvitLayeredNavigation','0.0.1','0.0.1'),('Hyva_MirasvitQuickNavigation','0.0.1','0.0.1'),('Hyva_MirasvitScroll','0.0.1','0.0.1'),('Imega_FinanceGateway','1.0.0','1.0.0'),('Imega_FinanceModule','1.0.0','1.0.0'),('Magecomp_Customshipping','1.0.1','1.0.1'),('Magecomp_Deleteorder','1.0.2','1.0.2'),('Magecomp_Matrixrate','1.0.5','1.0.5'),('Magefan_AdminUserGuide','2.0.1','2.0.1'),('Magefan_Blog','2.9.1','2.9.1'),('Magefan_Cli','2.0.1','2.0.1'),('Magefan_Community','2.1.10','2.1.10'),('Magefan_GuestToCustomer','2.0.18','2.0.18'),('Magefan_WysiwygAdvanced','2.0.12','2.0.12'),('Magento_DataExporter','42.0.1','42.0.1'),('Magento_QueryXml','42.0.0','42.0.0'),('Magento_Securitytxt','1.0.0','1.0.0'),('Magento_ServicesConnector','1.1.0','1.1.0'),('Magento_ServicesId','1.1.0','1.1.0'),('Magento_ServicesIdLayout','1.0.0','1.0.0'),('MagePal_Reindex','1.0.0','1.0.0'),('Mageplaza_Core','1.0.0','1.0.0'),('Mageplaza_CronSchedule','1.0.0','1.0.0'),('Mageplaza_FrequentlyBought','1.0.0','1.0.0'),('Mageplaza_LayeredNavigation','2.0.0','2.0.0'),('Mageplaza_Smtp','1.2.5','1.2.5'),('MageWorx_GeoIP','2.0.0','2.0.0'),('MageWorx_Info','1.0.0','1.0.0'),('MageWorx_OptionHealthChecker','1.0.0','1.0.0'),('MageWorx_ShippingCalculatorBase','1.0.0','1.0.0'),('Magiccart_Alothemes','2.0','2.0'),('Magiccart_Lookbook','2.0','2.0'),('Magiccart_Magicmenu','2.0','2.0'),('Magiccart_Magicproduct','2.0','2.0'),('Magiccart_Magicslider','2.0','2.0'),('Magiccart_Shopbrand','2.0','2.0'),('Magiccart_Testimonial','2.0','2.0'),('Mollie_Payment','1.19.0','1.19.0'),('MSP_CmsImportExport','1.1.1','1.1.1'),('Nexus_AdminPaypalMethod','1.0.1','1.0.1'),('Nexus_BookAppointment','1.0.0','1.0.0'),('Nexus_Catalog','1.0.0','1.0.0'),('Nexus_Review','1.0.0','1.0.0'),('Nexus_Sales','1.0.0','1.0.0'),('Nexus_Swiper','1.0.0','1.0.0'),('Nexus_Theme','1.0.0','1.0.0'),('OlegKoval_RegenerateUrlRewrites','1.6.2','1.6.2'),('OuterEdge_BulkActions','1.0.0','1.0.0'),('PayPal_Braintree','4.6.1','4.6.1'),('Ridha_Category','1.0.0','1.0.0'),('UdeyTech_CategoryHelper','1.0.0','1.0.0'),('Ves_All','1.0.3','1.0.3'),('Ves_Brand','1.0.4','1.0.4'),('Ves_Setup','1.0.0','1.0.0'),('Yireo_Webp2','0.4.0','0.4.0');

--
-- Table structure for table `shipping_matrixrate`
--

CREATE TABLE `shipping_matrixrate` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `website_id` int NOT NULL DEFAULT '0',
  `dest_country_id` varchar(4) NOT NULL DEFAULT '' COMMENT 'Destination Post Code (Zip)',
  `dest_region_id` int NOT NULL DEFAULT '0',
  `dest_city` varchar(30) NOT NULL DEFAULT '' COMMENT 'Destination City',
  `dest_zip_to` varchar(20) NOT NULL DEFAULT '0.0000' COMMENT 'Destination Post Code To (Zip)',
  `dest_zip` varchar(20) NOT NULL DEFAULT '0.0000' COMMENT 'Destination Post Code (Zip)',
  `condition_name` varchar(20) NOT NULL DEFAULT '' COMMENT 'Destination Post Code To (Zip)',
  `condition_from_value` decimal(10,0) NOT NULL DEFAULT '0' COMMENT 'Condition From',
  `condition_to_value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Condition To',
  `delivery_type` varchar(255) NOT NULL DEFAULT '' COMMENT 'Delivery Type',
  `price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `cost` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'cost',
  PRIMARY KEY (`id`),
  KEY `IDX_17AB318C239E4ABC4FE1275BF071CE70` (`website_id`,`dest_country_id`,`dest_region_id`,`dest_city`,`dest_zip_to`,`dest_zip`,`condition_name`,`condition_from_value`,`condition_to_value`,`delivery_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sales Flat Quote Address';

--
-- Dumping data for table `shipping_matrixrate`
--


--
-- Table structure for table `shipping_tablerate`
--

CREATE TABLE `shipping_tablerate` (
  `pk` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Primary key',
  `website_id` int NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `dest_country_id` varchar(4) NOT NULL DEFAULT '0' COMMENT 'Destination coutry ISO/2 or ISO/3 code',
  `dest_region_id` int NOT NULL DEFAULT '0' COMMENT 'Destination Region ID',
  `dest_zip` varchar(10) NOT NULL DEFAULT '*' COMMENT 'Destination Post Code (Zip)',
  `condition_name` varchar(30) NOT NULL COMMENT 'Rate Condition name',
  `condition_value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Rate condition value',
  `price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `cost` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Cost',
  PRIMARY KEY (`pk`),
  UNIQUE KEY `UNQ_D60821CDB2AFACEE1566CFC02D0D4CAA` (`website_id`,`dest_country_id`,`dest_region_id`,`dest_zip`,`condition_name`,`condition_value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Shipping Tablerate';

--
-- Dumping data for table `shipping_tablerate`
--


--
-- Table structure for table `sitemap`
--

CREATE TABLE `sitemap` (
  `sitemap_id` int unsigned NOT NULL AUTO_INCREMENT COMMENT 'Sitemap ID',
  `sitemap_type` varchar(32) DEFAULT NULL COMMENT 'Sitemap Type',
  `sitemap_filename` varchar(32) DEFAULT NULL COMMENT 'Sitemap Filename',
  `sitemap_path` varchar(255) DEFAULT NULL COMMENT 'Sitemap Path',
  `sitemap_time` timestamp NULL DEFAULT NULL COMMENT 'Sitemap Time',
  `store_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  PRIMARY KEY (`sitemap_id`),
  KEY `SITEMAP_STORE_ID` (`store_id`),
  CONSTRAINT `SITEMAP_STORE_ID_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='XML Sitemap';

--
-- Dumping data for table `sitemap`
--


--
-- Table structure for table `store`
--

CREATE TABLE `store` (
  `store_id` smallint unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store ID',
  `code` varchar(32) DEFAULT NULL COMMENT 'Code',
  `website_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `group_id` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Group ID',
  `name` varchar(255) NOT NULL COMMENT 'Store Name',
  `sort_order` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
  `is_active` smallint unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
  PRIMARY KEY (`store_id`),
  UNIQUE KEY `STORE_CODE` (`code`),
  KEY `STORE_WEBSITE_ID` (`website_id`),
  KEY `STORE_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
  KEY `STORE_GROUP_ID` (`group_id`),
  CONSTRAINT `STORE_GROUP_ID_STORE_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `store_group` (`group_id`) ON DELETE CASCADE,
  CONSTRAINT `STORE_WEBSITE_ID_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb3 COMMENT='Stores';

--
-- Dumping data for table `store`
--

INSERT INTO `store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1),(2,'premier',2,2,'Premier DIY',0,1),(3,'nexus_home',3,5,'nexus-home-view',0,1),(4,'premierdiy_home',4,6,'premierdiy-home',0,1),(5,'banyostore',1,4,'banyostore',0,1),(6,'nexus',1,3,'nexus',0,1);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_store_after_insert` AFTER INSERT ON `store` FOR EACH ROW BEGIN
INSERT IGNORE INTO `store_data_exporter_cl` (`entity_id`) VALUES (NEW.`website_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_store_after_update` AFTER UPDATE ON `store` FOR EACH ROW BEGIN
IF (NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`code` <=> OLD.`code`) OR NOT(NEW.`website_id` <=> OLD.`website_id`) OR NOT(NEW.`group_id` <=> OLD.`group_id`) OR NOT(NEW.`name` <=> OLD.`name`) OR NOT(NEW.`sort_order` <=> OLD.`sort_order`) OR NOT(NEW.`is_active` <=> OLD.`is_active`)) THEN INSERT IGNORE INTO `store_data_exporter_cl` (`entity_id`) VALUES (NEW.`website_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `trg_store_after_delete` AFTER DELETE ON `store` FOR EACH ROW BEGIN
INSERT IGNORE INTO `store_data_exporter_cl` (`entity_id`) VALUES (OLD.`website_id`);
END */;;
DELIMITER ;

--
