--
-- Host: localhost    Database: gamamojo_ei3
-- ------------------------------------------------------


--
-- Table structure for table `mg_admin_adobe_ims_webapi`
--

CREATE TABLE `mg_admin_adobe_ims_webapi` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `admin_user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Admin User Id',
  `access_token_hash` varchar(255) DEFAULT NULL COMMENT 'Access Token Hash',
  `access_token` text COMMENT 'Access Token',
  `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',
  `last_check_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Last check time',
  `access_token_expires_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Access Token Expires At',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_ADMIN_ADOBE_IMS_WEBAPI_ACCESS_TOKEN_HASH` (`access_token_hash`),
  KEY `mg_ADMIN_ADOBE_IMS_WEBAPI_ADMIN_USER_ID` (`admin_user_id`),
  CONSTRAINT `mg_ADM_ADOBE_IMS_WEBAPI_ADM_USR_ID_mg_ADM_USR_USR_ID` FOREIGN KEY (`admin_user_id`) REFERENCES `mg_admin_user` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Admin Adobe IMS Webapi';

--
-- Dumping data for table `mg_admin_adobe_ims_webapi`
--


--
-- Table structure for table `mg_admin_analytics_usage_version_log`
--

CREATE TABLE `mg_admin_analytics_usage_version_log` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log ID',
  `last_viewed_in_version` varchar(50) NOT NULL COMMENT 'Viewer last viewed on product version',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_ADMIN_ANALYTICS_USAGE_VERSION_LOG_LAST_VIEWED_IN_VERSION` (`last_viewed_in_version`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='Admin Notification Viewer Log Table';

--
-- Dumping data for table `mg_admin_analytics_usage_version_log`
--

INSERT INTO `mg_admin_analytics_usage_version_log` VALUES (1,'2.4.8-p3');

--
-- Table structure for table `mg_admin_passwords`
--

CREATE TABLE `mg_admin_passwords` (
  `password_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Password ID',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID',
  `password_hash` varchar(255) DEFAULT NULL COMMENT 'Password Hash',
  `expires` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Deprecated',
  `last_updated` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Last Updated',
  PRIMARY KEY (`password_id`),
  KEY `mg_ADMIN_PASSWORDS_USER_ID` (`user_id`),
  CONSTRAINT `mg_ADMIN_PASSWORDS_USER_ID_mg_ADMIN_USER_USER_ID` FOREIGN KEY (`user_id`) REFERENCES `mg_admin_user` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='Admin Passwords';

--
-- Dumping data for table `mg_admin_passwords`
--

INSERT INTO `mg_admin_passwords` VALUES (1,1,'296b5efb3a436915ec0ada8537817699673f6ee4ea8202a51ae0aad5cf88be70:vRlVTZHDMqANvTh2aURPy8YpR1FOyrbf:1',0,1763405972),(2,1,'bd40a00c2d2a74c9afb8969d4726bf818cece90a8437ce50c6a1e07e9f14fbdb:0c1VTe1jRXrTNWhFEhj73QmtT9psqdY7:3_32_2_67108864',0,1763406520),(3,2,'d901aa80660315953343b2fe4ee6805f167ea49b2e078019ba747f0aeef1c583:orHS99WiKl0vKQ6akPuUSIgcc3vOX9pa:3_32_2_67108864',0,1763483402),(4,2,'926737e2b92df7a6f3126000e80ba6a8bd4720c42bff9e5809bb8816aad4f153:uyLowp9o3sTib4s0g2J9JKk1MqDKooNz:3_32_2_67108864',0,1769619301);

--
-- Table structure for table `mg_admin_system_messages`
--

CREATE TABLE `mg_admin_system_messages` (
  `identity` varchar(100) NOT NULL COMMENT 'Message ID',
  `severity` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Problem type',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Create date',
  PRIMARY KEY (`identity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Admin System Messages';

--
-- Dumping data for table `mg_admin_system_messages`
--

INSERT INTO `mg_admin_system_messages` VALUES ('da332d712f3215b9b94bfa268c398323',2,'2025-11-28 18:25:36');

--
-- Table structure for table `mg_admin_user`
--

CREATE TABLE `mg_admin_user` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID',
  `firstname` varchar(32) DEFAULT NULL COMMENT 'User First Name',
  `lastname` varchar(32) DEFAULT NULL COMMENT 'User Last Name',
  `email` varchar(128) DEFAULT NULL COMMENT 'User Email',
  `username` varchar(40) DEFAULT NULL COMMENT 'User Login',
  `password` varchar(255) NOT NULL COMMENT 'User Password',
  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'User Created Time',
  `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'User Modified Time',
  `logdate` timestamp NULL DEFAULT NULL COMMENT 'User Last Login Time',
  `lognum` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'User Login Number',
  `reload_acl_flag` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Reload ACL',
  `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'User Is Active',
  `extra` text COMMENT 'User Extra Data',
  `rp_token` text COMMENT 'Reset Password Link Token',
  `rp_token_created_at` timestamp NULL DEFAULT NULL COMMENT 'Reset Password Link Token Creation Date',
  `interface_locale` varchar(16) NOT NULL DEFAULT 'en_US' COMMENT 'Backend interface locale',
  `failures_num` smallint(6) DEFAULT '0' COMMENT 'Failure Number',
  `first_failure` timestamp NULL DEFAULT NULL COMMENT 'First Failure',
  `lock_expires` timestamp NULL DEFAULT NULL COMMENT 'Expiration Lock Dates',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `mg_ADMIN_USER_USERNAME` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='Admin User Table';

--
-- Dumping data for table `mg_admin_user`
--

INSERT INTO `mg_admin_user` VALUES (1,'mojo','team','mojomexico.software@gmail.com','mojomexico','bd40a00c2d2a74c9afb8969d4726bf818cece90a8437ce50c6a1e07e9f14fbdb:0c1VTe1jRXrTNWhFEhj73QmtT9psqdY7:3_32_2_67108864','0000-00-00 00:00:00','2026-01-28 16:53:27','2026-01-28 16:53:27',21,0,1,'{\"configState\":{\"web_unsecure\":\"1\",\"web_secure\":\"1\",\"web_session\":\"1\",\"web_cookie\":\"1\",\"web_browser_capabilities\":\"1\",\"web_url\":\"0\",\"web_seo\":\"0\",\"web_default\":\"0\",\"web_default_layouts\":\"0\",\"general_single_store_mode\":\"1\",\"general_country\":\"1\",\"general_region\":\"1\",\"general_locale\":\"0\",\"general_store_information\":\"1\",\"admin_dashboard\":\"1\",\"admin_url\":\"1\",\"admin_startup\":\"1\",\"system_full_page_cache\":\"1\",\"system_cron\":\"0\",\"system_mysqlmq\":\"0\",\"system_smtp\":\"0\",\"system_currency\":\"0\",\"system_security\":\"0\",\"system_adminnotification\":\"0\",\"system_backup\":\"0\",\"system_bulk\":\"0\",\"system_media_storage_configuration\":\"0\",\"system_upload_configuration\":\"0\",\"system_media_gallery\":\"0\",\"system_media_gallery_renditions\":\"0\",\"system_adobe_stock_integration\":\"0\",\"catalog_seo\":\"1\",\"catalog_search\":\"1\",\"catalog_fields_masks\":\"1\",\"catalog_frontend\":\"1\",\"admin_security\":\"1\",\"admin_emails\":\"0\",\"admin_grid\":\"0\",\"admin_captcha\":\"0\",\"admin_usage\":\"0\",\"wishlist_general\":\"1\",\"wishlist_email\":\"1\",\"wishlist_wishlist_link\":\"1\",\"customer_online_customers\":\"1\",\"customer_startup\":\"1\",\"customer_address_templates\":\"1\",\"customer_create_account\":\"1\"}}',NULL,NULL,'en_US',0,NULL,NULL),(2,'Juvenal','N','juvesys@gmail.com','juvesys','926737e2b92df7a6f3126000e80ba6a8bd4720c42bff9e5809bb8816aad4f153:uyLowp9o3sTib4s0g2J9JKk1MqDKooNz:3_32_2_67108864','2025-11-18 16:30:02','2026-01-28 16:55:01',NULL,0,1,1,'null',NULL,NULL,'es_MX',0,NULL,NULL);

--
-- Table structure for table `mg_admin_user_expiration`
--

CREATE TABLE `mg_admin_user_expiration` (
  `user_id` int(10) unsigned NOT NULL COMMENT 'User ID',
  `expires_at` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'User Expiration Date',
  PRIMARY KEY (`user_id`),
  CONSTRAINT `mg_ADMIN_USER_EXPIRATION_USER_ID_mg_ADMIN_USER_USER_ID` FOREIGN KEY (`user_id`) REFERENCES `mg_admin_user` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Admin User expiration dates table';

--
-- Dumping data for table `mg_admin_user_expiration`
--


--
-- Table structure for table `mg_admin_user_session`
--

CREATE TABLE `mg_admin_user_session` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `session_id` varchar(1) DEFAULT NULL COMMENT 'Deprecated: Session ID value no longer used',
  `user_id` int(10) unsigned DEFAULT NULL COMMENT 'Admin User ID',
  `status` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Current Session status',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created Time',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Update Time',
  `ip` varchar(15) NOT NULL COMMENT 'Remote user IP',
  PRIMARY KEY (`id`),
  KEY `mg_ADMIN_USER_SESSION_SESSION_ID` (`session_id`),
  KEY `mg_ADMIN_USER_SESSION_USER_ID` (`user_id`),
  CONSTRAINT `mg_ADMIN_USER_SESSION_USER_ID_mg_ADMIN_USER_USER_ID` FOREIGN KEY (`user_id`) REFERENCES `mg_admin_user` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COMMENT='Admin User sessions table';

--
-- Dumping data for table `mg_admin_user_session`
--

INSERT INTO `mg_admin_user_session` VALUES (1,NULL,1,0,'2025-11-17 19:08:40','2025-11-17 19:10:39','189.192.94.69'),(2,NULL,1,2,'2025-11-18 16:27:02','2025-12-10 17:06:57','189.203.98.5'),(3,NULL,1,0,'2025-11-28 18:23:13','2025-11-28 19:41:51','189.203.98.5'),(4,NULL,1,2,'2025-11-30 22:44:35','2025-12-10 17:06:57','189.203.98.5'),(5,NULL,1,0,'2025-11-30 23:21:30','2025-12-01 00:46:35','189.203.98.5'),(6,NULL,1,2,'2025-12-01 19:43:32','2025-12-10 17:06:57','189.203.98.5'),(7,NULL,1,2,'2025-12-02 14:57:08','2025-12-10 17:06:57','189.203.98.5'),(8,NULL,1,0,'2025-12-02 15:14:52','2025-12-02 15:15:09','189.203.98.5'),(9,NULL,1,2,'2025-12-02 17:17:43','2025-12-10 17:06:57','189.203.98.5'),(10,NULL,NULL,0,'2025-12-02 17:35:39','2025-12-02 17:35:39','189.203.98.5'),(11,NULL,1,2,'2025-12-09 17:21:35','2025-12-10 17:06:57','189.203.98.5'),(12,NULL,1,0,'2025-12-09 17:40:42','2025-12-09 17:42:07','189.203.98.5'),(13,NULL,1,0,'2025-12-09 17:42:22','2025-12-09 17:48:14','189.203.98.5'),(14,NULL,1,2,'2025-12-09 17:51:58','2025-12-10 17:06:57','189.203.98.5'),(15,NULL,1,2,'2025-12-09 18:32:31','2025-12-10 17:06:57','189.203.98.5'),(16,NULL,1,0,'2025-12-09 18:52:21','2025-12-09 19:20:00','189.203.98.5'),(17,NULL,1,0,'2025-12-10 17:06:57','2025-12-10 17:24:25','189.203.98.5'),(18,NULL,1,0,'2025-12-19 00:17:09','2025-12-19 00:30:39','189.203.98.5'),(19,NULL,1,0,'2026-01-26 22:20:35','2026-01-26 23:53:34','189.203.98.5'),(20,NULL,1,2,'2026-01-27 17:36:33','2026-01-28 04:31:21','189.203.98.5'),(21,NULL,1,0,'2026-01-28 04:31:21','2026-01-28 04:41:05','189.203.98.5'),(22,NULL,1,1,'2026-01-28 16:53:27','2026-01-28 16:55:00','189.203.98.5');

--
-- Table structure for table `mg_adminnotification_inbox`
--

CREATE TABLE `mg_adminnotification_inbox` (
  `notification_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Notification ID',
  `severity` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Problem type',
  `date_added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Create date',
  `title` varchar(255) NOT NULL COMMENT 'Title',
  `description` text COMMENT 'Description',
  `url` varchar(255) DEFAULT NULL COMMENT 'Url',
  `is_read` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Flag if notification read',
  `is_remove` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Flag if notification might be removed',
  PRIMARY KEY (`notification_id`),
  KEY `mg_ADMINNOTIFICATION_INBOX_SEVERITY` (`severity`),
  KEY `mg_ADMINNOTIFICATION_INBOX_IS_READ` (`is_read`),
  KEY `mg_ADMINNOTIFICATION_INBOX_IS_REMOVE` (`is_remove`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='Adminnotification Inbox';

--
-- Dumping data for table `mg_adminnotification_inbox`
--

INSERT INTO `mg_adminnotification_inbox` VALUES (1,4,'0000-00-00 00:00:00','Disable Notice','To improve performance, collecting statistics for the Magento Report module is disabled by default. \nYou can enable it in System Config.','',0,0),(2,1,'2026-01-26 22:20:37','Attention! Your Magento 2 Blog Extension version is extremely outdated. It is strongly recommended to update it to the latest version 2.14.1','\n                                    https://magefan.com/magento2-blog-extension?ancient=2.11.0                                 ','https://magefan.com/magento2-blog-extension?ancient=2.11.0',0,0),(3,4,'2026-01-26 22:20:37','FAQ: How to configure &quot;read more&quot; in your Magento 2 blog post',' If you still don&#039;t know how to configure read more functionality in your magento 2 blog post, please read this article.\n                    Online documentation for Magento 2 blog extension is also available on our website. http://goo.gl/XOEdpy ','http://magefan.com/blog/add-read-more-tag-to-blog-post-content/?from=notification1',0,0),(4,1,'2026-01-27 17:36:34','Attention! Your Magento 2 Blog Extension version is extremely outdated. It is strongly recommended to update it to the latest version 2.15.0','\n                                    https://magefan.com/magento2-blog-extension?ancient=2.11.0                                 ','https://magefan.com/magento2-blog-extension?ancient=2.11.0',0,0);

--
-- Table structure for table `mg_adobe_stock_asset`
--

CREATE TABLE `mg_adobe_stock_asset` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `media_gallery_id` int(10) unsigned DEFAULT NULL COMMENT 'Media gallery ID',
  `category_id` int(10) unsigned DEFAULT NULL COMMENT 'Category ID',
  `creator_id` int(10) unsigned DEFAULT NULL COMMENT 'Creator ID',
  `is_licensed` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Licensed',
  `creation_date` varchar(255) DEFAULT NULL COMMENT 'Creation Date',
  PRIMARY KEY (`id`),
  KEY `mg_ADOBE_STOCK_ASSET_MDA_GLR_ID_mg_MDA_GLR_ASSET_ID` (`media_gallery_id`),
  KEY `mg_ADOBE_STOCK_ASSET_ID` (`id`),
  KEY `mg_ADOBE_STOCK_ASSET_CATEGORY_ID` (`category_id`),
  KEY `mg_ADOBE_STOCK_ASSET_CREATOR_ID` (`creator_id`),
  CONSTRAINT `mg_ADOBE_STOCK_ASSET_CATEGORY_ID_mg_ADOBE_STOCK_CATEGORY_ID` FOREIGN KEY (`category_id`) REFERENCES `mg_adobe_stock_category` (`id`) ON DELETE SET NULL,
  CONSTRAINT `mg_ADOBE_STOCK_ASSET_CREATOR_ID_mg_ADOBE_STOCK_CREATOR_ID` FOREIGN KEY (`creator_id`) REFERENCES `mg_adobe_stock_creator` (`id`) ON DELETE SET NULL,
  CONSTRAINT `mg_ADOBE_STOCK_ASSET_MDA_GLR_ID_mg_MDA_GLR_ASSET_ID` FOREIGN KEY (`media_gallery_id`) REFERENCES `mg_media_gallery_asset` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Adobe Stock Asset';

--
-- Dumping data for table `mg_adobe_stock_asset`
--


--
-- Table structure for table `mg_adobe_stock_category`
--

CREATE TABLE `mg_adobe_stock_category` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  PRIMARY KEY (`id`),
  KEY `mg_ADOBE_STOCK_CATEGORY_ID` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Adobe Stock Category';

--
-- Dumping data for table `mg_adobe_stock_category`
--


--
-- Table structure for table `mg_adobe_stock_creator`
--

CREATE TABLE `mg_adobe_stock_creator` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `name` varchar(255) DEFAULT NULL COMMENT 'Asset creator''s name',
  PRIMARY KEY (`id`),
  KEY `mg_ADOBE_STOCK_CREATOR_ID` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Adobe Stock Creator';

--
-- Dumping data for table `mg_adobe_stock_creator`
--


--
-- Table structure for table `mg_adobe_user_profile`
--

CREATE TABLE `mg_adobe_user_profile` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `admin_user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Admin User Id',
  `name` varchar(255) NOT NULL COMMENT 'Display Name',
  `email` varchar(255) NOT NULL COMMENT 'user profile email',
  `image` varchar(255) NOT NULL COMMENT 'user profile avatar',
  `account_type` varchar(255) DEFAULT NULL COMMENT 'Account Type',
  `access_token` text COMMENT 'Access Token',
  `refresh_token` text COMMENT 'Refresh Token',
  `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',
  `access_token_expires_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'Access Token Expires At',
  PRIMARY KEY (`id`),
  KEY `mg_ADOBE_USER_PROFILE_ADMIN_USER_ID` (`admin_user_id`),
  CONSTRAINT `mg_ADOBE_USER_PROFILE_ADMIN_USER_ID_mg_ADMIN_USER_USER_ID` FOREIGN KEY (`admin_user_id`) REFERENCES `mg_admin_user` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Adobe IMS User Profile';

--
-- Dumping data for table `mg_adobe_user_profile`
--


--
-- Table structure for table `mg_authorization_role`
--

CREATE TABLE `mg_authorization_role` (
  `role_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Role ID',
  `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Parent Role ID',
  `tree_level` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Role Tree Level',
  `sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Role Sort Order',
  `role_type` varchar(1) NOT NULL DEFAULT '0' COMMENT 'Role Type',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'User ID',
  `user_type` varchar(16) DEFAULT NULL COMMENT 'User Type',
  `role_name` varchar(50) DEFAULT NULL COMMENT 'Role Name',
  PRIMARY KEY (`role_id`),
  KEY `mg_AUTHORIZATION_ROLE_PARENT_ID_SORT_ORDER` (`parent_id`,`sort_order`),
  KEY `mg_AUTHORIZATION_ROLE_TREE_LEVEL` (`tree_level`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='Admin Role Table';

--
-- Dumping data for table `mg_authorization_role`
--

INSERT INTO `mg_authorization_role` VALUES (1,0,1,1,'G',0,'2','Administrators'),(2,1,2,0,'U',1,'2','mojo'),(4,1,2,0,'U',2,'2','Juvenal');

--
-- Table structure for table `mg_authorization_rule`
--

CREATE TABLE `mg_authorization_rule` (
  `rule_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule ID',
  `role_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Role ID',
  `resource_id` varchar(255) DEFAULT NULL COMMENT 'Resource ID',
  `privileges` varchar(20) DEFAULT NULL COMMENT 'Privileges',
  `permission` varchar(10) DEFAULT NULL COMMENT 'Permission',
  PRIMARY KEY (`rule_id`),
  KEY `mg_AUTHORIZATION_RULE_RESOURCE_ID_ROLE_ID` (`resource_id`,`role_id`),
  KEY `mg_AUTHORIZATION_RULE_ROLE_ID_RESOURCE_ID` (`role_id`,`resource_id`),
  CONSTRAINT `mg_AUTHORIZATION_RULE_ROLE_ID_mg_AUTHORIZATION_ROLE_ROLE_ID` FOREIGN KEY (`role_id`) REFERENCES `mg_authorization_role` (`role_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='Admin Rule Table';

--
-- Dumping data for table `mg_authorization_rule`
--

INSERT INTO `mg_authorization_rule` VALUES (1,1,'Magento_Backend::all',NULL,'allow');

--
-- Table structure for table `mg_braintree_credit_prices`
--

CREATE TABLE `mg_braintree_credit_prices` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Row ID',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product Id',
  `term` int(11) NOT NULL COMMENT 'Credit Term',
  `monthly_payment` decimal(12,2) NOT NULL COMMENT 'Monthly Payment',
  `instalment_rate` decimal(12,2) NOT NULL COMMENT 'Instalment Rate',
  `cost_of_purchase` decimal(12,2) NOT NULL COMMENT 'Cost of purchase',
  `total_inc_interest` decimal(12,2) NOT NULL COMMENT 'Total Inc Interest',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_BRAINTREE_CREDIT_PRICES_PRODUCT_ID_TERM` (`product_id`,`term`),
  KEY `mg_BRAINTREE_CREDIT_PRICES_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Braintree credit rates';

--
-- Dumping data for table `mg_braintree_credit_prices`
--


--
-- Table structure for table `mg_braintree_transaction_details`
--

CREATE TABLE `mg_braintree_transaction_details` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order Id',
  `transaction_source` text COMMENT 'Transaction Source',
  PRIMARY KEY (`entity_id`),
  KEY `mg_BRAINTREE_TRANSACTION_DETAILS_ORDER_ID` (`order_id`),
  CONSTRAINT `FK_3EDCAC75D4D61EFAAE195F7E540F3B3F` FOREIGN KEY (`order_id`) REFERENCES `mg_sales_order` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Braintree transaction details table';

--
-- Dumping data for table `mg_braintree_transaction_details`
--


--
-- Table structure for table `mg_cache`
--

CREATE TABLE `mg_cache` (
  `id` varchar(200) NOT NULL COMMENT 'Cache Id',
  `data` mediumblob COMMENT 'Cache Data',
  `create_time` int(11) DEFAULT NULL COMMENT 'Cache Creation Time',
  `update_time` int(11) DEFAULT NULL COMMENT 'Time of Cache Updating',
  `expire_time` int(11) DEFAULT NULL COMMENT 'Cache Expiration Time',
  PRIMARY KEY (`id`),
  KEY `mg_CACHE_EXPIRE_TIME` (`expire_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Caches';

--
-- Dumping data for table `mg_cache`
--


--
-- Table structure for table `mg_cache_tag`
--

CREATE TABLE `mg_cache_tag` (
  `tag` varchar(100) NOT NULL COMMENT 'Tag',
  `cache_id` varchar(200) NOT NULL COMMENT 'Cache Id',
  PRIMARY KEY (`tag`,`cache_id`),
  KEY `mg_CACHE_TAG_CACHE_ID` (`cache_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Tag Caches';

--
-- Dumping data for table `mg_cache_tag`
--


--
-- Table structure for table `mg_captcha_log`
--

CREATE TABLE `mg_captcha_log` (
  `type` varchar(32) NOT NULL COMMENT 'Type',
  `value` varchar(255) NOT NULL COMMENT 'Value',
  `count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Count',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Update Time',
  PRIMARY KEY (`type`,`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Count Login Attempts';

--
-- Dumping data for table `mg_captcha_log`
--

INSERT INTO `mg_captcha_log` VALUES ('1','45.135.232.10',6,'2025-12-31 08:19:41'),('1','45.135.232.178',6,'2026-01-14 03:35:29'),('2','admin',4,'2026-01-12 04:24:35'),('2','admin@gamanorte.com',1,'2026-01-13 06:04:28'),('2','gamanorte',1,'2026-01-14 03:35:29'),('2','Jqadmin',4,'2026-01-12 04:24:28'),('2','Jqadmin@gamanorte.com',1,'2026-01-13 06:04:21'),('2','Jqgamanorte',1,'2026-01-14 03:35:22');

--
-- Table structure for table `mg_catalog_category_entity`
--

CREATE TABLE `mg_catalog_category_entity` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Set ID',
  `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Parent Category ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation Time',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Update Time',
  `path` varchar(255) NOT NULL COMMENT 'Tree Path',
  `position` int(11) NOT NULL COMMENT 'Position',
  `level` int(11) NOT NULL DEFAULT '0' COMMENT 'Tree Level',
  `children_count` int(11) NOT NULL COMMENT 'Child Count',
  PRIMARY KEY (`entity_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_LEVEL` (`level`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_PATH` (`path`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Table';

--
-- Dumping data for table `mg_catalog_category_entity`
--

INSERT INTO `mg_catalog_category_entity` VALUES (1,3,0,'0000-00-00 00:00:00','2025-11-30 23:32:59','1',0,0,28),(2,3,1,'0000-00-00 00:00:00','2025-11-30 23:32:59','1/2',1,1,27),(3,3,2,'2025-11-28 18:40:26','2025-11-30 23:03:26','1/2/3',1,2,5),(4,3,2,'2025-11-28 18:40:46','2025-11-30 23:32:59','1/2/4',2,2,3),(5,3,2,'2025-11-30 22:48:56','2025-11-30 23:30:48','1/2/5',3,2,2),(7,3,2,'2025-11-30 22:50:49','2025-11-30 22:50:49','1/2/7',4,2,0),(9,3,2,'2025-11-30 22:54:26','2025-11-30 22:54:26','1/2/9',5,2,0),(10,3,2,'2025-11-30 22:55:26','2025-11-30 22:55:26','1/2/10',6,2,0),(11,3,2,'2025-11-30 22:55:56','2025-11-30 22:55:56','1/2/11',7,2,0),(12,3,2,'2025-11-30 22:57:49','2025-11-30 23:29:18','1/2/12',8,2,8),(13,3,2,'2025-11-30 22:59:43','2025-11-30 22:59:43','1/2/13',9,2,0),(14,3,3,'2025-11-30 23:00:19','2025-11-30 23:00:19','1/2/3/14',1,3,0),(15,3,3,'2025-11-30 23:01:05','2025-11-30 23:01:05','1/2/3/15',2,3,0),(16,3,3,'2025-11-30 23:01:47','2025-11-30 23:01:47','1/2/3/16',3,3,0),(17,3,3,'2025-11-30 23:02:43','2025-11-30 23:02:43','1/2/3/17',4,3,0),(18,3,3,'2025-11-30 23:03:26','2025-11-30 23:03:26','1/2/3/18',5,3,0),(19,3,12,'2025-11-30 23:22:03','2025-11-30 23:22:03','1/2/12/19',1,3,0),(20,3,12,'2025-11-30 23:22:34','2025-11-30 23:22:34','1/2/12/20',2,3,0),(21,3,12,'2025-11-30 23:23:32','2025-11-30 23:23:32','1/2/12/21',3,3,0),(22,3,12,'2025-11-30 23:24:13','2025-11-30 23:24:13','1/2/12/22',4,3,0),(23,3,12,'2025-11-30 23:24:47','2025-11-30 23:24:47','1/2/12/23',5,3,0),(24,3,12,'2025-11-30 23:25:22','2025-11-30 23:25:22','1/2/12/24',6,3,0),(25,3,12,'2025-11-30 23:25:56','2025-11-30 23:25:56','1/2/12/25',7,3,0),(27,3,12,'2025-11-30 23:29:18','2025-11-30 23:29:18','1/2/12/27',8,3,0),(28,3,5,'2025-11-30 23:30:07','2025-11-30 23:30:07','1/2/5/28',1,3,0),(29,3,5,'2025-11-30 23:30:48','2025-11-30 23:30:48','1/2/5/29',2,3,0),(30,3,4,'2025-11-30 23:31:40','2025-11-30 23:31:40','1/2/4/30',1,3,0),(31,3,4,'2025-11-30 23:32:24','2025-11-30 23:32:24','1/2/4/31',2,3,0),(32,3,4,'2025-11-30 23:32:59','2025-11-30 23:32:59','1/2/4/32',3,3,0);

--
-- Table structure for table `mg_catalog_category_entity_datetime`
--

CREATE TABLE `mg_catalog_category_entity_datetime` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` datetime DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_CTGR_ENTT_DTIME_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_DATETIME_ENTITY_ID` (`entity_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_DATETIME_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_DATETIME_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CAT_CTGR_ENTT_DTIME_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_DTIME_ENTT_ID_mg_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_category_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_DTIME_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Datetime Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_category_entity_datetime`
--

INSERT INTO `mg_catalog_category_entity_datetime` VALUES (1,61,0,5,NULL),(2,62,0,5,NULL),(3,61,0,3,NULL),(4,62,0,3,NULL),(5,61,0,4,NULL),(6,62,0,4,NULL);

--
-- Table structure for table `mg_catalog_category_entity_decimal`
--

CREATE TABLE `mg_catalog_category_entity_decimal` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` decimal(20,6) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_CTGR_ENTT_DEC_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_DECIMAL_ENTITY_ID` (`entity_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_DECIMAL_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_DECIMAL_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CAT_CTGR_ENTT_DEC_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_DEC_ENTT_ID_mg_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_category_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_DEC_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Decimal Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_category_entity_decimal`
--


--
-- Table structure for table `mg_catalog_category_entity_int`
--

CREATE TABLE `mg_catalog_category_entity_int` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` int(11) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CATALOG_CATEGORY_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_INT_ENTITY_ID` (`entity_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_INT_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_INT_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CATALOG_CATEGORY_ENTITY_INT_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_INT_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_INT_ENTT_ID_mg_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_category_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=157 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Integer Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_category_entity_int`
--

INSERT INTO `mg_catalog_category_entity_int` VALUES (1,69,0,1,1),(2,69,0,2,1),(3,46,0,2,1),(4,46,0,3,1),(5,54,0,3,1),(6,69,0,3,1),(7,46,0,4,1),(8,54,0,4,1),(9,69,0,4,1),(10,46,0,5,1),(11,54,0,5,1),(12,69,0,5,1),(13,70,0,5,0),(14,71,0,5,0),(20,46,0,7,1),(21,54,0,7,1),(22,69,0,7,1),(23,70,0,7,0),(24,71,0,7,0),(30,53,0,5,NULL),(31,53,0,3,NULL),(32,70,0,3,0),(33,71,0,3,0),(34,53,0,4,NULL),(35,70,0,4,0),(36,71,0,4,0),(37,46,0,9,1),(38,54,0,9,1),(39,69,0,9,1),(40,70,0,9,0),(41,71,0,9,0),(42,46,0,10,1),(43,54,0,10,1),(44,69,0,10,1),(45,70,0,10,0),(46,71,0,10,0),(47,46,0,11,1),(48,54,0,11,1),(49,69,0,11,1),(50,70,0,11,0),(51,71,0,11,0),(52,46,0,12,1),(53,54,0,12,1),(54,69,0,12,1),(55,70,0,12,0),(56,71,0,12,0),(57,46,0,13,1),(58,54,0,13,1),(59,69,0,13,1),(60,70,0,13,0),(61,71,0,13,0),(62,46,0,14,1),(63,54,0,14,1),(64,69,0,14,1),(65,70,0,14,0),(66,71,0,14,0),(67,46,0,15,1),(68,54,0,15,1),(69,69,0,15,1),(70,70,0,15,0),(71,71,0,15,0),(72,46,0,16,1),(73,54,0,16,1),(74,69,0,16,1),(75,70,0,16,0),(76,71,0,16,0),(77,46,0,17,1),(78,54,0,17,1),(79,69,0,17,1),(80,70,0,17,0),(81,71,0,17,0),(82,46,0,18,1),(83,54,0,18,1),(84,69,0,18,1),(85,70,0,18,0),(86,71,0,18,0),(87,46,0,19,1),(88,54,0,19,1),(89,69,0,19,1),(90,70,0,19,0),(91,71,0,19,0),(92,46,0,20,1),(93,54,0,20,1),(94,69,0,20,1),(95,70,0,20,0),(96,71,0,20,0),(97,46,0,21,1),(98,54,0,21,1),(99,69,0,21,1),(100,70,0,21,0),(101,71,0,21,0),(102,46,0,22,1),(103,54,0,22,1),(104,69,0,22,1),(105,70,0,22,0),(106,71,0,22,0),(107,46,0,23,1),(108,54,0,23,1),(109,69,0,23,1),(110,70,0,23,0),(111,71,0,23,0),(112,46,0,24,1),(113,54,0,24,1),(114,69,0,24,1),(115,70,0,24,0),(116,71,0,24,0),(117,46,0,25,1),(118,54,0,25,1),(119,69,0,25,1),(120,70,0,25,0),(121,71,0,25,0),(127,46,0,27,1),(128,54,0,27,1),(129,69,0,27,1),(130,70,0,27,0),(131,71,0,27,0),(132,46,0,28,1),(133,54,0,28,1),(134,69,0,28,1),(135,70,0,28,0),(136,71,0,28,0),(137,46,0,29,1),(138,54,0,29,1),(139,69,0,29,1),(140,70,0,29,0),(141,71,0,29,0),(142,46,0,30,1),(143,54,0,30,1),(144,69,0,30,1),(145,70,0,30,0),(146,71,0,30,0),(147,46,0,31,1),(148,54,0,31,1),(149,69,0,31,1),(150,70,0,31,0),(151,71,0,31,0),(152,46,0,32,1),(153,54,0,32,1),(154,69,0,32,1),(155,70,0,32,0),(156,71,0,32,0);

--
-- Table structure for table `mg_catalog_category_entity_text`
--

CREATE TABLE `mg_catalog_category_entity_text` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` mediumtext COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_CTGR_ENTT_TEXT_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_TEXT_ENTITY_ID` (`entity_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_TEXT_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_TEXT_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CATALOG_CATEGORY_ENTITY_TEXT_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_TEXT_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_TEXT_ENTT_ID_mg_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_category_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Text Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_category_entity_text`
--

INSERT INTO `mg_catalog_category_entity_text` VALUES (1,47,0,5,NULL),(2,50,0,5,NULL),(3,51,0,5,NULL),(4,47,0,3,NULL),(5,50,0,3,NULL),(6,51,0,3,NULL),(7,47,0,4,NULL),(8,50,0,4,NULL),(9,51,0,4,NULL);

--
-- Table structure for table `mg_catalog_category_entity_varchar`
--

CREATE TABLE `mg_catalog_category_entity_varchar` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` varchar(255) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_CTGR_ENTT_VCHR_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_VARCHAR_ENTITY_ID` (`entity_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_VARCHAR_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_CATEGORY_ENTITY_VARCHAR_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CAT_CTGR_ENTT_VCHR_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_VCHR_ENTT_ID_mg_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_category_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_ENTT_VCHR_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=166 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Varchar Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_category_entity_varchar`
--

INSERT INTO `mg_catalog_category_entity_varchar` VALUES (1,45,0,1,'Root Catalog'),(2,52,0,2,'PRODUCTS'),(3,45,0,2,'Default Category'),(4,45,0,3,'Cocina'),(5,119,0,3,'cocina'),(6,120,0,3,'cocina'),(7,45,0,4,'Baño'),(8,119,0,4,'bano'),(9,120,0,4,'bano'),(10,45,0,5,'Recubrimiento'),(11,52,0,5,'PRODUCTS'),(12,63,0,5,'category-full-width'),(13,119,0,5,'recubrimientos'),(14,120,0,5,'recubrimientos'),(20,45,0,7,'Puertas'),(21,52,0,7,'PRODUCTS'),(22,63,0,7,'category-full-width'),(23,119,0,7,'puertas'),(24,120,0,7,'puertas'),(31,48,0,5,NULL),(32,49,0,5,NULL),(33,60,0,5,NULL),(35,48,0,3,NULL),(36,49,0,3,NULL),(37,52,0,3,'PRODUCTS'),(38,60,0,3,NULL),(39,63,0,3,NULL),(41,48,0,4,NULL),(42,49,0,4,NULL),(43,52,0,4,'PRODUCTS'),(44,60,0,4,NULL),(45,63,0,4,NULL),(46,45,0,9,'Iluminacion'),(47,52,0,9,'PRODUCTS'),(48,63,0,9,'category-full-width'),(49,119,0,9,'iluminacion'),(50,120,0,9,'iluminacion'),(51,45,0,10,'Decoraciòn'),(52,52,0,10,'PRODUCTS'),(53,63,0,10,'category-full-width'),(54,119,0,10,'decoracion'),(55,120,0,10,'decoracion'),(56,45,0,11,'Jardin'),(57,52,0,11,'PRODUCTS'),(58,63,0,11,'category-full-width'),(59,119,0,11,'jardin'),(60,120,0,11,'jardin'),(61,45,0,12,'Mobiliario'),(62,52,0,12,'PRODUCTS'),(63,63,0,12,'category-full-width'),(64,119,0,12,'mobiliario'),(65,120,0,12,'mobiliario'),(66,45,0,13,'closet'),(67,52,0,13,'PRODUCTS'),(68,63,0,13,'category-full-width'),(69,119,0,13,'closet'),(70,120,0,13,'closet'),(71,45,0,14,'cocina a la medida'),(72,52,0,14,'PRODUCTS'),(73,63,0,14,'category-full-width'),(74,119,0,14,'cocina-a-la-medida'),(75,120,0,14,'cocina/cocina-a-la-medida'),(76,45,0,15,'cocinas modulares'),(77,52,0,15,'PRODUCTS'),(78,63,0,15,'category-full-width'),(79,119,0,15,'cocinas-modulares'),(80,120,0,15,'cocina/cocinas-modulares'),(81,45,0,16,'griferia'),(82,52,0,16,'PRODUCTS'),(83,63,0,16,'category-full-width'),(84,119,0,16,'griferia'),(85,120,0,16,'cocina/griferia'),(86,45,0,17,'vajillas y cubiertos'),(87,52,0,17,'PRODUCTS'),(88,63,0,17,'category-full-width'),(89,119,0,17,'vajillas-y-cubiertos'),(90,120,0,17,'cocina/vajillas-y-cubiertos'),(91,45,0,18,'batidoras'),(92,52,0,18,'PRODUCTS'),(93,63,0,18,'category-full-width'),(94,119,0,18,'batidoras'),(95,120,0,18,'cocina/batidoras'),(96,45,0,19,'decorativos'),(97,52,0,19,'PRODUCTS'),(98,63,0,19,'category-full-width'),(99,119,0,19,'decorativos'),(100,120,0,19,'mobiliario/decorativos'),(101,45,0,20,'salas'),(102,52,0,20,'PRODUCTS'),(103,63,0,20,'category-full-width'),(104,119,0,20,'salas'),(105,120,0,20,'mobiliario/salas'),(106,45,0,21,'comedores'),(107,52,0,21,'PRODUCTS'),(108,63,0,21,'category-full-width'),(109,119,0,21,'comedores'),(110,120,0,21,'mobiliario/comedores'),(111,45,0,22,'sofas'),(112,52,0,22,'PRODUCTS'),(113,63,0,22,'category-full-width'),(114,119,0,22,'sofas'),(115,120,0,22,'mobiliario/sofas'),(116,45,0,23,'sillones'),(117,52,0,23,'PRODUCTS'),(118,63,0,23,'category-full-width'),(119,119,0,23,'sillones'),(120,120,0,23,'mobiliario/sillones'),(121,45,0,24,'sillas'),(122,52,0,24,'PRODUCTS'),(123,63,0,24,'category-full-width'),(124,119,0,24,'sillas'),(125,120,0,24,'mobiliario/sillas'),(126,45,0,25,'mesas'),(127,52,0,25,'PRODUCTS'),(128,63,0,25,'category-full-width'),(129,119,0,25,'mesas'),(130,120,0,25,'mobiliario/mesas'),(136,45,0,27,'buros'),(137,52,0,27,'PRODUCTS'),(138,63,0,27,'category-full-width'),(139,119,0,27,'buros'),(140,120,0,27,'mobiliario/buros'),(141,45,0,28,'porcelanico'),(142,52,0,28,'PRODUCTS'),(143,63,0,28,'category-full-width'),(144,119,0,28,'porcelanico'),(145,120,0,28,'recubrimientos/porcelanico'),(146,45,0,29,'ceramico'),(147,52,0,29,'PRODUCTS'),(148,63,0,29,'category-full-width'),(149,119,0,29,'ceramico'),(150,120,0,29,'recubrimientos/ceramico'),(151,45,0,30,'griferia'),(152,52,0,30,'PRODUCTS'),(153,63,0,30,'category-full-width'),(154,119,0,30,'griferia'),(155,120,0,30,'bano/griferia'),(156,45,0,31,'Sanitarios'),(157,52,0,31,'PRODUCTS'),(158,63,0,31,'category-full-width'),(159,119,0,31,'sanitarios'),(160,120,0,31,'bano/sanitarios'),(161,45,0,32,'gabinetes'),(162,52,0,32,'PRODUCTS'),(163,63,0,32,'category-full-width'),(164,119,0,32,'gabinetes'),(165,120,0,32,'bano/gabinetes');

--
-- Table structure for table `mg_catalog_category_product`
--

CREATE TABLE `mg_catalog_category_product` (
  `entity_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Category ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `position` int(11) NOT NULL DEFAULT '0' COMMENT 'Position',
  PRIMARY KEY (`entity_id`,`category_id`,`product_id`),
  UNIQUE KEY `mg_CATALOG_CATEGORY_PRODUCT_CATEGORY_ID_PRODUCT_ID` (`category_id`,`product_id`),
  KEY `mg_CATALOG_CATEGORY_PRODUCT_PRODUCT_ID` (`product_id`),
  CONSTRAINT `mg_CAT_CTGR_PRD_CTGR_ID_mg_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `mg_catalog_category_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CTGR_PRD_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product To Category Linkage Table';

--
-- Dumping data for table `mg_catalog_category_product`
--

INSERT INTO `mg_catalog_category_product` VALUES (1,3,1,0),(2,4,1,0),(3,16,1,0),(4,30,1,0),(5,3,2,0),(6,4,2,0),(7,16,2,0),(8,30,2,0),(9,4,3,0),(10,30,3,0);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_category_product_after_insert AFTER INSERT ON mg_catalog_category_product FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`product_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_category_product_after_update AFTER UPDATE ON mg_catalog_category_product FOR EACH ROW
BEGIN
IF (NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`category_id` <=> OLD.`category_id`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`position` <=> OLD.`position`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`product_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_category_product_after_delete AFTER DELETE ON mg_catalog_category_product FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`product_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_category_product_index`
--

CREATE TABLE `mg_catalog_category_product_index` (
  `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Category ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `position` int(11) DEFAULT NULL COMMENT 'Position',
  `is_parent` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Parent',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `visibility` smallint(5) unsigned NOT NULL COMMENT 'Visibility',
  PRIMARY KEY (`category_id`,`product_id`,`store_id`),
  KEY `mg_CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY` (`product_id`,`store_id`,`category_id`,`visibility`),
  KEY `IDX_BB4A590114301ED9D94C8239D3EF6DA8` (`store_id`,`category_id`,`visibility`,`is_parent`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Product Index';

--
-- Dumping data for table `mg_catalog_category_product_index`
--


--
-- Table structure for table `mg_catalog_category_product_index_replica`
--

CREATE TABLE `mg_catalog_category_product_index_replica` (
  `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Category ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `position` int(11) DEFAULT NULL COMMENT 'Position',
  `is_parent` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Parent',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `visibility` smallint(5) unsigned NOT NULL COMMENT 'Visibility',
  PRIMARY KEY (`category_id`,`product_id`,`store_id`),
  KEY `mg_CAT_CTGR_PRD_IDX_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY` (`product_id`,`store_id`,`category_id`,`visibility`),
  KEY `IDX_BB4A590114301ED9D94C8239D3EF6DA8` (`store_id`,`category_id`,`visibility`,`is_parent`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Product Index';

--
-- Dumping data for table `mg_catalog_category_product_index_replica`
--


--
-- Table structure for table `mg_catalog_category_product_index_store1`
--

CREATE TABLE `mg_catalog_category_product_index_store1` (
  `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Category Id',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product Id',
  `position` int(11) DEFAULT NULL COMMENT 'Position',
  `is_parent` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Parent',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `visibility` smallint(5) unsigned NOT NULL COMMENT 'Visibility',
  PRIMARY KEY (`category_id`,`product_id`,`store_id`),
  KEY `IDX_6FBAC0A8825789D69AB86505B4914089` (`product_id`,`store_id`,`category_id`,`visibility`),
  KEY `IDX_8F15547F72AF00C7861A223EC6C69052` (`store_id`,`category_id`,`visibility`,`is_parent`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Prmg Catalog Category Product Index Store1';

--
-- Dumping data for table `mg_catalog_category_product_index_store1`
--

INSERT INTO `mg_catalog_category_product_index_store1` VALUES (2,1,0,1,1,4),(2,2,0,1,1,4),(2,3,0,1,1,4),(3,1,0,1,1,4),(3,2,0,1,1,4),(4,1,0,1,1,4),(4,2,0,1,1,4),(4,3,0,1,1,4),(16,1,0,1,1,4),(16,2,0,1,1,4),(30,1,0,1,1,4),(30,2,0,1,1,4),(30,3,0,1,1,4);

--
-- Table structure for table `mg_catalog_category_product_index_store1_replica`
--

CREATE TABLE `mg_catalog_category_product_index_store1_replica` (
  `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Category Id',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product Id',
  `position` int(11) DEFAULT NULL COMMENT 'Position',
  `is_parent` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Parent',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Id',
  `visibility` smallint(5) unsigned NOT NULL COMMENT 'Visibility',
  PRIMARY KEY (`category_id`,`product_id`,`store_id`),
  KEY `mg_CAT_CTGR_PRD_IDX_STORE1_PRD_ID_STORE_ID_CTGR_ID_VISIBILITY` (`product_id`,`store_id`,`category_id`,`visibility`),
  KEY `IDX_EAA97D781ECAB4B7D46CE05989FB5FCE` (`store_id`,`category_id`,`visibility`,`is_parent`,`position`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Prmg Catalog Category Product Index Store1 Replica';

--
-- Dumping data for table `mg_catalog_category_product_index_store1_replica`
--

INSERT INTO `mg_catalog_category_product_index_store1_replica` VALUES (2,1,0,1,1,4),(2,2,0,1,1,4),(2,3,0,1,1,4),(3,1,0,1,1,4),(3,2,0,1,1,4),(4,1,0,1,1,4),(4,2,0,1,1,4),(4,3,0,1,1,4),(16,1,0,1,1,4),(16,2,0,1,1,4),(30,1,0,1,1,4),(30,2,0,1,1,4),(30,3,0,1,1,4);

--
-- Table structure for table `mg_catalog_category_product_index_tmp`
--

CREATE TABLE `mg_catalog_category_product_index_tmp` (
  `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Category ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `position` int(11) NOT NULL DEFAULT '0' COMMENT 'Position',
  `is_parent` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Parent',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `visibility` smallint(5) unsigned NOT NULL COMMENT 'Visibility',
  PRIMARY KEY (`category_id`,`product_id`,`store_id`),
  KEY `mg_CAT_CTGR_PRD_IDX_TMP_PRD_ID_CTGR_ID_STORE_ID` (`product_id`,`category_id`,`store_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Category Product Indexer temporary table';

--
-- Dumping data for table `mg_catalog_category_product_index_tmp`
--


--
-- Table structure for table `mg_catalog_compare_item`
--

CREATE TABLE `mg_catalog_compare_item` (
  `catalog_compare_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Compare Item ID',
  `visitor_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Visitor ID',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `list_id` int(10) unsigned DEFAULT NULL COMMENT 'List ID',
  PRIMARY KEY (`catalog_compare_item_id`),
  KEY `mg_CAT_CMP_ITEM_LIST_ID_mg_CAT_CMP_LIST_LIST_ID` (`list_id`),
  KEY `mg_CATALOG_COMPARE_ITEM_PRODUCT_ID` (`product_id`),
  KEY `mg_CATALOG_COMPARE_ITEM_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  KEY `mg_CATALOG_COMPARE_ITEM_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `mg_CATALOG_COMPARE_ITEM_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CATALOG_COMPARE_ITEM_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL,
  CONSTRAINT `mg_CAT_CMP_ITEM_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CMP_ITEM_LIST_ID_mg_CAT_CMP_LIST_LIST_ID` FOREIGN KEY (`list_id`) REFERENCES `mg_catalog_compare_list` (`list_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_CMP_ITEM_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Compare Table';

--
-- Dumping data for table `mg_catalog_compare_item`
--


--
-- Table structure for table `mg_catalog_compare_list`
--

CREATE TABLE `mg_catalog_compare_list` (
  `list_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Compare List ID',
  `list_id_mask` varchar(32) DEFAULT NULL COMMENT 'Masked ID',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  PRIMARY KEY (`list_id`),
  UNIQUE KEY `mg_CATALOG_COMPARE_LIST_CUSTOMER_ID` (`customer_id`),
  KEY `mg_CATALOG_COMPARE_LIST_LIST_ID_MASK` (`list_id_mask`),
  CONSTRAINT `mg_CAT_CMP_LIST_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Compare List with hash Table';

--
-- Dumping data for table `mg_catalog_compare_list`
--


--
-- Table structure for table `mg_catalog_eav_attribute`
--

CREATE TABLE `mg_catalog_eav_attribute` (
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `frontend_input_renderer` varchar(255) DEFAULT NULL COMMENT 'Frontend Input Renderer',
  `is_global` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Global',
  `is_visible` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Visible',
  `is_searchable` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Searchable',
  `is_filterable` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Filterable',
  `is_comparable` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Comparable',
  `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `is_html_allowed_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is HTML Allowed On Front',
  `is_used_for_price_rules` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Used For Price Rules',
  `is_filterable_in_search` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Filterable In Search',
  `used_in_product_listing` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Used In Product Listing',
  `used_for_sort_by` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Used For Sorting',
  `apply_to` varchar(255) DEFAULT NULL COMMENT 'Apply To',
  `is_visible_in_advanced_search` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible In Advanced Search',
  `position` int(11) NOT NULL DEFAULT '0' COMMENT 'Position',
  `is_wysiwyg_enabled` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is WYSIWYG Enabled',
  `is_used_for_promo_rules` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Used For Promo Rules',
  `is_required_in_admin_store` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Required In Admin Store',
  `is_used_in_grid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Used in Grid',
  `is_visible_in_grid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible in Grid',
  `is_filterable_in_grid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Filterable in Grid',
  `search_weight` float NOT NULL DEFAULT '1' COMMENT 'Search Weight',
  `is_pagebuilder_enabled` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Is PageBuilder Enabled',
  `additional_data` text COMMENT 'Additional swatch attributes data',
  PRIMARY KEY (`attribute_id`),
  KEY `mg_CATALOG_EAV_ATTRIBUTE_USED_FOR_SORT_BY` (`used_for_sort_by`),
  KEY `mg_CATALOG_EAV_ATTRIBUTE_USED_IN_PRODUCT_LISTING` (`used_in_product_listing`),
  CONSTRAINT `mg_CAT_EAV_ATTR_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog EAV Attribute Table';

--
-- Dumping data for table `mg_catalog_eav_attribute`
--

INSERT INTO `mg_catalog_eav_attribute` VALUES (45,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(46,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(47,NULL,0,1,0,0,0,0,1,0,0,0,0,NULL,0,0,1,0,0,0,0,0,1,0,NULL),(48,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(49,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(50,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(51,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(52,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(53,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(54,NULL,1,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(55,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(56,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(57,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(58,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(59,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(60,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(61,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(62,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(63,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(64,NULL,0,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(65,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(66,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(67,'Magento\\Catalog\\Block\\Adminhtml\\Category\\Helper\\Sortby\\Available',0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(68,'Magento\\Catalog\\Block\\Adminhtml\\Category\\Helper\\Sortby\\DefaultSortby',0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(69,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(70,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(71,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(72,'Magento\\Catalog\\Block\\Adminhtml\\Category\\Helper\\Pricestep',0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(73,NULL,0,1,1,0,0,0,0,0,0,1,1,NULL,1,0,0,0,0,0,0,0,5,0,NULL),(74,NULL,1,1,1,0,1,0,0,0,0,0,0,NULL,1,0,0,0,0,0,0,0,6,0,NULL),(75,NULL,0,1,1,0,1,0,1,0,0,0,0,NULL,1,0,1,0,0,0,0,0,1,1,NULL),(76,NULL,0,1,1,0,1,0,1,0,0,1,0,NULL,1,0,1,0,0,1,0,0,1,0,NULL),(77,NULL,1,1,1,1,0,0,0,0,0,1,1,'simple,virtual,downloadable,bundle,configurable',1,0,0,0,0,0,0,0,1,0,NULL),(78,NULL,1,1,0,0,0,0,0,0,0,1,0,'simple,virtual,downloadable,bundle,configurable',0,0,0,0,0,1,0,1,1,0,NULL),(79,NULL,2,1,0,0,0,0,0,0,0,1,0,'simple,virtual,downloadable,bundle,configurable',0,0,0,0,0,1,0,0,1,0,NULL),(80,NULL,2,1,0,0,0,0,0,0,0,1,0,'simple,virtual,downloadable,bundle,configurable',0,0,0,0,0,1,0,0,1,0,NULL),(81,NULL,1,1,0,0,0,0,0,0,0,0,0,'simple,virtual,downloadable',0,0,0,0,0,1,0,1,1,0,NULL),(82,'Magento\\Catalog\\Block\\Adminhtml\\Product\\Helper\\Form\\Weight',1,1,0,0,0,0,0,0,0,0,0,'simple,virtual,downloadable,bundle,configurable',0,0,0,0,0,1,0,1,1,0,NULL),(83,NULL,1,1,1,1,1,0,0,0,0,0,0,'simple,configurable',1,0,0,0,0,1,0,1,1,0,NULL),(84,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,1,1,0,NULL),(85,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,1,1,0,NULL),(86,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,1,1,0,NULL),(87,NULL,0,1,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(88,NULL,0,1,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(89,NULL,0,1,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(90,NULL,1,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(91,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(92,NULL,2,1,0,0,0,0,0,0,0,0,0,'simple,virtual,downloadable,bundle',0,0,0,0,0,0,0,0,1,0,NULL),(93,NULL,1,1,1,1,1,0,0,0,0,0,0,'simple,virtual,configurable',1,0,0,0,0,1,0,1,1,0,NULL),(94,NULL,2,1,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,1,0,0,1,0,NULL),(95,NULL,2,1,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,1,0,0,1,0,NULL),(96,NULL,1,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(97,'Magento\\Framework\\Data\\Form\\Element\\Hidden',2,1,1,0,0,0,0,0,0,1,0,NULL,0,0,0,0,1,0,0,0,1,0,NULL),(98,NULL,0,0,0,0,0,0,0,0,0,0,0,'simple,virtual,downloadable,bundle,configurable',0,0,0,0,0,0,0,0,1,0,NULL),(99,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,1,0,0,0,1,0,NULL),(100,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,1,1,0,NULL),(101,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,0,1,0,NULL),(102,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,0,1,0,NULL),(103,NULL,0,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(104,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,0,1,0,NULL),(105,'Magento\\Catalog\\Block\\Adminhtml\\Product\\Helper\\Form\\Category',1,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(106,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(107,NULL,1,0,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(108,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(109,NULL,0,0,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(110,NULL,0,0,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(111,NULL,0,0,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(112,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(113,NULL,1,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(114,NULL,2,1,0,0,0,0,0,0,0,0,0,'simple,bundle,grouped,configurable',0,0,0,0,0,1,0,1,1,0,NULL),(115,'Magento\\CatalogInventory\\Block\\Adminhtml\\Form\\Field\\Stock',1,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(116,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,0,1,0,NULL),(117,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(118,NULL,0,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(119,NULL,0,1,1,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(120,NULL,0,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(121,NULL,0,1,1,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,1,0,1,1,0,NULL),(122,NULL,0,0,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(123,'Magento\\Msrp\\Block\\Adminhtml\\Product\\Helper\\Form\\Type',1,1,0,0,0,0,0,0,0,1,0,'simple,virtual,downloadable,bundle,configurable',0,0,0,0,0,1,0,1,1,0,NULL),(124,'Magento\\Msrp\\Block\\Adminhtml\\Product\\Helper\\Form\\Type\\Price',2,1,0,0,0,0,0,0,0,1,0,'simple,virtual,downloadable,bundle,configurable',0,0,0,0,0,0,0,0,1,0,NULL),(125,NULL,1,0,0,0,0,0,0,0,0,1,0,'downloadable',0,0,0,0,0,0,0,0,1,0,NULL),(126,NULL,0,0,0,0,0,0,0,0,0,0,0,'downloadable',0,0,0,0,0,0,0,0,1,0,NULL),(127,NULL,0,0,0,0,0,0,0,0,0,0,0,'downloadable',0,0,0,0,0,0,0,0,1,0,NULL),(128,NULL,1,0,0,0,0,0,0,0,0,1,0,'downloadable',0,0,0,0,0,0,0,0,1,0,NULL),(129,NULL,1,1,0,0,0,0,0,0,0,1,0,'bundle',0,0,0,0,0,0,0,0,1,0,NULL),(130,NULL,1,1,0,0,0,0,0,0,0,0,0,'bundle',0,0,0,0,0,0,0,0,1,0,NULL),(131,NULL,1,1,0,0,0,0,0,0,0,1,0,'bundle',0,0,0,0,0,0,0,0,1,0,NULL),(132,NULL,1,1,0,0,0,0,0,0,0,1,0,'bundle',0,0,0,0,0,0,0,0,1,0,NULL),(133,NULL,1,1,0,0,0,0,0,0,0,1,0,'bundle',0,0,0,0,0,0,0,0,1,0,NULL),(134,'Magento\\GiftMessage\\Block\\Adminhtml\\Product\\Helper\\Form\\Config',1,1,0,0,0,0,0,0,0,0,0,NULL,0,0,0,0,0,1,0,0,1,0,NULL),(135,NULL,0,1,0,0,0,0,0,0,0,1,0,NULL,0,0,0,0,0,0,0,0,1,0,NULL),(136,NULL,2,1,1,0,0,0,0,0,0,1,0,'simple,virtual,downloadable,bundle,configurable',0,0,0,0,0,1,0,1,1,0,NULL),(137,NULL,0,1,1,0,1,1,1,0,0,1,1,NULL,1,0,0,1,0,1,0,1,1,0,NULL);

--
-- Table structure for table `mg_catalog_product_attribute_cl`
--

CREATE TABLE `mg_catalog_product_attribute_cl` (
  `version_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Version ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  PRIMARY KEY (`version_id`)
) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=utf8mb4 COMMENT='mg_catalog_product_attribute_cl';

--
-- Dumping data for table `mg_catalog_product_attribute_cl`
--

INSERT INTO `mg_catalog_product_attribute_cl` VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1),(14,1),(15,1),(16,1),(17,1),(18,1),(19,1),(20,1),(21,1),(22,1),(23,1),(24,1),(25,2),(26,2),(27,2),(28,2),(29,2),(30,2),(31,2),(32,2),(33,2),(34,2),(35,2),(36,2),(37,2),(38,2),(39,2),(40,2),(41,2),(42,2),(43,2),(44,2),(45,2),(46,2),(47,1),(48,2),(49,3),(50,3),(51,3),(52,3),(53,3),(54,3),(55,3),(56,3),(57,3),(58,3),(59,3),(60,3),(61,3),(62,3),(63,3),(64,3),(65,3),(66,3),(67,3),(68,3),(69,3),(70,3),(71,3),(72,2),(73,2),(74,2),(75,2),(76,2),(77,2),(78,2),(79,2),(80,3),(81,3),(82,3),(83,3),(84,3),(85,3),(86,3),(87,3),(88,2),(89,2),(90,2),(91,2);

--
-- Table structure for table `mg_catalog_product_bundle_option`
--

CREATE TABLE `mg_catalog_product_bundle_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option ID',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',
  `required` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Required',
  `position` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Position',
  `type` varchar(255) DEFAULT NULL COMMENT 'Type',
  PRIMARY KEY (`option_id`),
  KEY `mg_CATALOG_PRODUCT_BUNDLE_OPTION_PARENT_ID` (`parent_id`),
  CONSTRAINT `mg_CAT_PRD_BNDL_OPT_PARENT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`parent_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Bundle Option';

--
-- Dumping data for table `mg_catalog_product_bundle_option`
--


--
-- Table structure for table `mg_catalog_product_bundle_option_value`
--

CREATE TABLE `mg_catalog_product_bundle_option_value` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `option_id` int(10) unsigned NOT NULL COMMENT 'Option ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  `parent_product_id` int(10) unsigned NOT NULL COMMENT 'Parent Product ID',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_BNDL_OPT_VAL_OPT_ID_PARENT_PRD_ID_STORE_ID` (`option_id`,`parent_product_id`,`store_id`),
  CONSTRAINT `mg_CAT_PRD_BNDL_OPT_VAL_OPT_ID_mg_CAT_PRD_BNDL_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `mg_catalog_product_bundle_option` (`option_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Bundle Option Value';

--
-- Dumping data for table `mg_catalog_product_bundle_option_value`
--


--
-- Table structure for table `mg_catalog_product_bundle_price_index`
--

CREATE TABLE `mg_catalog_product_bundle_price_index` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `customer_group_id` int(10) unsigned NOT NULL COMMENT 'Customer Group ID',
  `min_price` decimal(20,6) NOT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) NOT NULL COMMENT 'Max Price',
  PRIMARY KEY (`entity_id`,`website_id`,`customer_group_id`),
  KEY `mg_CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOG_PRODUCT_BUNDLE_PRICE_INDEX_CUSTOMER_GROUP_ID` (`customer_group_id`),
  CONSTRAINT `FK_8DB5B8954D6EEC1C9A89C61D561C2D39` FOREIGN KEY (`customer_group_id`) REFERENCES `mg_customer_group` (`customer_group_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_BNDL_PRICE_IDX_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_BNDL_PRICE_IDX_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Bundle Price Index';

--
-- Dumping data for table `mg_catalog_product_bundle_price_index`
--


--
-- Table structure for table `mg_catalog_product_bundle_selection`
--

CREATE TABLE `mg_catalog_product_bundle_selection` (
  `selection_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Selection ID',
  `option_id` int(10) unsigned NOT NULL COMMENT 'Option ID',
  `parent_product_id` int(10) unsigned NOT NULL COMMENT 'Parent Product ID',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `position` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Position',
  `is_default` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Default',
  `selection_price_type` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Selection Price Type',
  `selection_price_value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Selection Price Value',
  `selection_qty` decimal(12,4) DEFAULT NULL COMMENT 'Selection Qty',
  `selection_can_change_qty` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Selection Can Change Qty',
  PRIMARY KEY (`selection_id`),
  KEY `mg_CATALOG_PRODUCT_BUNDLE_SELECTION_OPTION_ID` (`option_id`),
  KEY `mg_CATALOG_PRODUCT_BUNDLE_SELECTION_PRODUCT_ID` (`product_id`),
  CONSTRAINT `mg_CAT_PRD_BNDL_SELECTION_OPT_ID_mg_CAT_PRD_BNDL_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `mg_catalog_product_bundle_option` (`option_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_BNDL_SELECTION_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Bundle Selection';

--
-- Dumping data for table `mg_catalog_product_bundle_selection`
--


--
-- Table structure for table `mg_catalog_product_bundle_selection_price`
--

CREATE TABLE `mg_catalog_product_bundle_selection_price` (
  `selection_id` int(10) unsigned NOT NULL COMMENT 'Selection ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `selection_price_type` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Selection Price Type',
  `selection_price_value` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Selection Price Value',
  `parent_product_id` int(10) unsigned NOT NULL COMMENT 'Parent Product ID',
  PRIMARY KEY (`selection_id`,`parent_product_id`,`website_id`),
  KEY `mg_CATALOG_PRODUCT_BUNDLE_SELECTION_PRICE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_48A0D40A08C88AC5E40947636D598C57` FOREIGN KEY (`selection_id`) REFERENCES `mg_catalog_product_bundle_selection` (`selection_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_BNDL_SELECTION_PRICE_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Bundle Selection Price';

--
-- Dumping data for table `mg_catalog_product_bundle_selection_price`
--


--
-- Table structure for table `mg_catalog_product_bundle_stock_index`
--

CREATE TABLE `mg_catalog_product_bundle_stock_index` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `stock_id` smallint(5) unsigned NOT NULL COMMENT 'Stock ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `stock_status` smallint(6) DEFAULT '0' COMMENT 'Stock Status',
  PRIMARY KEY (`entity_id`,`website_id`,`stock_id`,`option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Bundle Stock Index';

--
-- Dumping data for table `mg_catalog_product_bundle_stock_index`
--


--
-- Table structure for table `mg_catalog_product_entity`
--

CREATE TABLE `mg_catalog_product_entity` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `attribute_set_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute Set ID',
  `type_id` varchar(32) NOT NULL DEFAULT 'simple' COMMENT 'Type ID',
  `sku` varchar(64) NOT NULL COMMENT 'SKU',
  `has_options` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Has Options',
  `required_options` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Required Options',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Creation Time',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Update Time',
  PRIMARY KEY (`entity_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_ATTRIBUTE_SET_ID` (`attribute_set_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_SKU` (`sku`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Table';

--
-- Dumping data for table `mg_catalog_product_entity`
--

INSERT INTO `mg_catalog_product_entity` VALUES (1,4,'simple','PC-94679',0,0,'2025-11-28 18:41:18','2025-12-01 00:23:33'),(2,4,'simple','PC-82285',0,0,'2025-12-01 00:21:02','2026-01-27 18:20:36'),(3,4,'simple','12110030211',0,0,'2025-12-01 00:28:17','2026-01-27 18:20:04');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_after_insert AFTER INSERT ON mg_catalog_product_entity FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_after_update AFTER UPDATE ON mg_catalog_product_entity FOR EACH ROW
BEGIN
IF (NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`attribute_set_id` <=> OLD.`attribute_set_id`) OR NOT(NEW.`type_id` <=> OLD.`type_id`) OR NOT(NEW.`sku` <=> OLD.`sku`) OR NOT(NEW.`has_options` <=> OLD.`has_options`) OR NOT(NEW.`required_options` <=> OLD.`required_options`) OR NOT(NEW.`created_at` <=> OLD.`created_at`)) THEN INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`attribute_set_id` <=> OLD.`attribute_set_id`) OR NOT(NEW.`type_id` <=> OLD.`type_id`) OR NOT(NEW.`sku` <=> OLD.`sku`) OR NOT(NEW.`has_options` <=> OLD.`has_options`) OR NOT(NEW.`required_options` <=> OLD.`required_options`) OR NOT(NEW.`created_at` <=> OLD.`created_at`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_after_delete AFTER DELETE ON mg_catalog_product_entity FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_product_entity_datetime`
--

CREATE TABLE `mg_catalog_product_entity_datetime` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` datetime DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_ENTT_DTIME_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_DATETIME_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_DATETIME_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CAT_PRD_ENTT_DTIME_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_DTIME_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_DTIME_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Datetime Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_product_entity_datetime`
--

INSERT INTO `mg_catalog_product_entity_datetime` VALUES (10,80,0,1,NULL),(11,95,0,1,NULL),(12,102,0,1,NULL),(20,94,0,2,'2025-12-01 00:00:00');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_datetime_after_insert AFTER INSERT ON mg_catalog_product_entity_datetime FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_datetime_after_update AFTER UPDATE ON mg_catalog_product_entity_datetime FOR EACH ROW
BEGIN
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_datetime_after_delete AFTER DELETE ON mg_catalog_product_entity_datetime FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_product_entity_decimal`
--

CREATE TABLE `mg_catalog_product_entity_decimal` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` decimal(20,6) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_ENTT_DEC_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_DECIMAL_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `mg_CATALOG_PRODUCT_ENTITY_DECIMAL_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_DEC_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_DEC_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Decimal Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_product_entity_decimal`
--

INSERT INTO `mg_catalog_product_entity_decimal` VALUES (1,77,0,1,1.000000),(2,82,0,1,1.140000),(3,81,0,1,NULL),(4,77,0,2,1.000000),(5,81,0,2,NULL),(6,77,0,3,1.000000),(7,82,0,3,1.140000),(8,81,0,3,NULL);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_decimal_after_insert AFTER INSERT ON mg_catalog_product_entity_decimal FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_decimal_after_update AFTER UPDATE ON mg_catalog_product_entity_decimal FOR EACH ROW
BEGIN
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_decimal_after_delete AFTER DELETE ON mg_catalog_product_entity_decimal FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_product_entity_gallery`
--

CREATE TABLE `mg_catalog_product_entity_gallery` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `position` int(11) NOT NULL DEFAULT '0' COMMENT 'Position',
  `value` varchar(255) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_ENTT_GLR_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_GALLERY_ENTITY_ID` (`entity_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_GALLERY_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_GALLERY_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CATALOG_PRODUCT_ENTITY_GALLERY_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_GLR_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_GLR_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Gallery Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_product_entity_gallery`
--


--
-- Table structure for table `mg_catalog_product_entity_int`
--

CREATE TABLE `mg_catalog_product_entity_int` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` int(11) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CATALOG_PRODUCT_ENTITY_INT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_INT_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_INT_ATTRIBUTE_ID_STORE_ID_VALUE` (`attribute_id`,`store_id`,`value`),
  CONSTRAINT `mg_CATALOG_PRODUCT_ENTITY_INT_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_INT_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_INT_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Integer Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_product_entity_int`
--

INSERT INTO `mg_catalog_product_entity_int` VALUES (1,97,0,1,1),(2,99,0,1,4),(3,136,0,1,2),(4,97,0,2,1),(5,99,0,2,4),(6,136,0,2,2),(7,97,0,3,1),(8,99,0,3,4),(9,136,0,3,2);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_int_after_insert AFTER INSERT ON mg_catalog_product_entity_int FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_int_after_update AFTER UPDATE ON mg_catalog_product_entity_int FOR EACH ROW
BEGIN
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_int_after_delete AFTER DELETE ON mg_catalog_product_entity_int FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_product_entity_media_gallery`
--

CREATE TABLE `mg_catalog_product_entity_media_gallery` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `value` varchar(255) DEFAULT NULL COMMENT 'Value',
  `media_type` varchar(32) NOT NULL DEFAULT 'image' COMMENT 'Media entry type',
  `disabled` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Visibility status',
  PRIMARY KEY (`value_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `mg_CAT_PRD_ENTT_MDA_GLR_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Media Gallery Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_product_entity_media_gallery`
--

INSERT INTO `mg_catalog_product_entity_media_gallery` VALUES (1,90,'/g/r/griferiacocina.jpg','image',0),(5,90,'/1/0/103863.jpg','image',0),(6,90,'/9/7/97950.jpg','image',0);

--
-- Table structure for table `mg_catalog_product_entity_media_gallery_value`
--

CREATE TABLE `mg_catalog_product_entity_media_gallery_value` (
  `value_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Value ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `label` varchar(255) DEFAULT NULL COMMENT 'Label',
  `position` int(10) unsigned DEFAULT NULL COMMENT 'Position',
  `disabled` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Disabled',
  `record_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Record ID',
  PRIMARY KEY (`record_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_ENTITY_ID` (`entity_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_VALUE_ID` (`value_id`),
  KEY `mg_CAT_PRD_ENTT_MDA_GLR_VAL_ENTT_ID_VAL_ID_STORE_ID` (`entity_id`,`value_id`,`store_id`),
  CONSTRAINT `FK_CCAEA26D5065C2D6A7A1517EBBA6ED81` FOREIGN KEY (`value_id`) REFERENCES `mg_catalog_product_entity_media_gallery` (`value_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_MDA_GLR_VAL_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_MDA_GLR_VAL_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Media Gallery Attribute Value Table';

--
-- Dumping data for table `mg_catalog_product_entity_media_gallery_value`
--

INSERT INTO `mg_catalog_product_entity_media_gallery_value` VALUES (1,0,1,NULL,1,0,1),(5,0,2,NULL,0,0,5),(6,0,3,NULL,2,0,6);

--
-- Table structure for table `mg_catalog_product_entity_media_gallery_value_to_entity`
--

CREATE TABLE `mg_catalog_product_entity_media_gallery_value_to_entity` (
  `value_id` int(10) unsigned NOT NULL COMMENT 'Value media Entry ID',
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Product Entity ID',
  PRIMARY KEY (`value_id`,`entity_id`),
  KEY `FK_11B443E566D0F1A4C7684AD8FAC9CFAE` (`entity_id`),
  CONSTRAINT `FK_11B443E566D0F1A4C7684AD8FAC9CFAE` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_80EC8D98740F21EDD3873AF489663BE3` FOREIGN KEY (`value_id`) REFERENCES `mg_catalog_product_entity_media_gallery` (`value_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Link Media value to Product entity table';

--
-- Dumping data for table `mg_catalog_product_entity_media_gallery_value_to_entity`
--

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

--
-- Table structure for table `mg_catalog_product_entity_media_gallery_value_video`
--

CREATE TABLE `mg_catalog_product_entity_media_gallery_value_video` (
  `value_id` int(10) unsigned NOT NULL COMMENT 'Media Entity ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `provider` varchar(32) DEFAULT NULL COMMENT 'Video provider ID',
  `url` text COMMENT 'Video URL',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  `description` text COMMENT 'Page Meta Description',
  `metadata` text COMMENT 'Video meta data',
  PRIMARY KEY (`value_id`,`store_id`),
  KEY `mg_CAT_PRD_ENTT_MDA_GLR_VAL_VIDEO_STORE_ID_mg_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_A0FC129B4BF5F257FAA2BEFCD8CD532C` FOREIGN KEY (`value_id`) REFERENCES `mg_catalog_product_entity_media_gallery` (`value_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_MDA_GLR_VAL_VIDEO_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Video Table';

--
-- Dumping data for table `mg_catalog_product_entity_media_gallery_value_video`
--


--
-- Table structure for table `mg_catalog_product_entity_text`
--

CREATE TABLE `mg_catalog_product_entity_text` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` mediumtext COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CATALOG_PRODUCT_ENTITY_TEXT_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_TEXT_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_TEXT_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CATALOG_PRODUCT_ENTITY_TEXT_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_TEXT_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_TEXT_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Text Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_product_entity_text`
--

INSERT INTO `mg_catalog_product_entity_text` VALUES (1,85,0,1,'75.1229N MONOMANDO PARA LAVABO BAJO LEXUS BLACK'),(2,85,0,2,'MONOMANDO PARA LAVABO AL PISO'),(3,85,0,3,'KIT DE INSTALACION PARA LAVABO ');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_text_after_insert AFTER INSERT ON mg_catalog_product_entity_text FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_text_after_update AFTER UPDATE ON mg_catalog_product_entity_text FOR EACH ROW
BEGIN
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_text_after_delete AFTER DELETE ON mg_catalog_product_entity_text FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_product_entity_tier_price`
--

CREATE TABLE `mg_catalog_product_entity_tier_price` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `all_groups` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Applicable To All Customer Groups',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `qty` decimal(12,4) NOT NULL DEFAULT '1.0000' COMMENT 'QTY',
  `value` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Value',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `percentage_value` decimal(5,2) DEFAULT NULL COMMENT 'Percentage value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `UNQ_6D3040166530765494A77D7288801D79` (`entity_id`,`all_groups`,`customer_group_id`,`qty`,`website_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_TIER_PRICE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_TIER_PRICE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_7D8856808D646B3A5189328AC72A266D` FOREIGN KEY (`customer_group_id`) REFERENCES `mg_customer_group` (`customer_group_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_TIER_PRICE_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_TIER_PRICE_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Tier Price Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_product_entity_tier_price`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_catalog_product_entity_tier_price_after_insert` AFTER INSERT ON `mg_catalog_product_entity_tier_price` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_catalog_product_entity_tier_price_after_update` AFTER UPDATE ON `mg_catalog_product_entity_tier_price` FOR EACH ROW BEGIN
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`all_groups` <=> OLD.`all_groups`) OR NOT(NEW.`customer_group_id` <=> OLD.`customer_group_id`) OR NOT(NEW.`qty` <=> OLD.`qty`) OR NOT(NEW.`value` <=> OLD.`value`) OR NOT(NEW.`website_id` <=> OLD.`website_id`) OR NOT(NEW.`percentage_value` <=> OLD.`percentage_value`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`all_groups` <=> OLD.`all_groups`) OR NOT(NEW.`customer_group_id` <=> OLD.`customer_group_id`) OR NOT(NEW.`qty` <=> OLD.`qty`) OR NOT(NEW.`value` <=> OLD.`value`) OR NOT(NEW.`website_id` <=> OLD.`website_id`) OR NOT(NEW.`percentage_value` <=> OLD.`percentage_value`)) THEN INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_catalog_product_entity_tier_price_after_delete` AFTER DELETE ON `mg_catalog_product_entity_tier_price` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_product_entity_varchar`
--

CREATE TABLE `mg_catalog_product_entity_varchar` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `value` varchar(255) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_ENTT_VCHR_ENTT_ID_ATTR_ID_STORE_ID` (`entity_id`,`attribute_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_VARCHAR_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_ENTITY_VARCHAR_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CATALOG_PRODUCT_ENTITY_VARCHAR_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_VCHR_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_ENTT_VCHR_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Varchar Attribute Backend Table';

--
-- Dumping data for table `mg_catalog_product_entity_varchar`
--

INSERT INTO `mg_catalog_product_entity_varchar` VALUES (1,73,0,1,'MONOMANDO PARA LAVABO BAJO LEXUS BLACK'),(2,84,0,1,'75.1229N MONOMANDO PARA LAVABO BAJO LEXUS BLACK'),(3,86,0,1,'75.1229N MONOMANDO PARA LAVABO BAJO LEXUS BLACK'),(4,104,0,1,'product-full-width'),(5,106,0,1,'container2'),(6,114,0,1,'MX'),(7,121,0,1,'75-1229n-monomando-para-lavabo-bajo-lexus-black'),(8,124,0,1,'0'),(9,134,0,1,'2'),(10,87,0,1,'/g/r/griferiacocina.jpg'),(11,88,0,1,'/g/r/griferiacocina.jpg'),(12,89,0,1,'/g/r/griferiacocina.jpg'),(13,135,0,1,'/g/r/griferiacocina.jpg'),(14,137,0,1,'CASTEL'),(15,73,0,2,'MONOMANDO PARA LAVABO AL PISO'),(16,84,0,2,'MONOMANDO PARA LAVABO AL PISO'),(17,86,0,2,'MONOMANDO PARA LAVABO AL PISO'),(18,104,0,2,'product-full-width'),(19,106,0,2,'container2'),(20,121,0,2,'monomando-para-lavabo-al-piso'),(21,124,0,2,'0'),(22,134,0,2,'2'),(23,137,0,2,'DINASTY'),(24,87,0,2,'no_selection'),(25,88,0,2,'no_selection'),(26,89,0,2,'no_selection'),(27,135,0,2,'no_selection'),(28,114,0,2,'MX'),(29,73,0,3,'KIT DE INSTALACION PARA LAVABO '),(30,84,0,3,'KIT DE INSTALACION PARA LAVABO '),(31,86,0,3,'KIT DE INSTALACION PARA LAVABO '),(32,104,0,3,'product-full-width'),(33,106,0,3,'container2'),(34,121,0,3,'kit-de-instalacion-para-lavabo'),(35,124,0,3,'0'),(36,134,0,3,'2'),(37,137,0,3,'RUGO'),(38,87,0,3,'/9/7/97950.jpg'),(39,88,0,3,'/9/7/97950.jpg'),(40,89,0,3,'/9/7/97950.jpg'),(41,135,0,3,'/9/7/97950.jpg');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_varchar_after_insert AFTER INSERT ON mg_catalog_product_entity_varchar FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_varchar_after_update AFTER UPDATE ON mg_catalog_product_entity_varchar FOR EACH ROW
BEGIN
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
IF (NOT(NEW.`value_id` <=> OLD.`value_id`) OR NOT(NEW.`attribute_id` <=> OLD.`attribute_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`value` <=> OLD.`value`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_entity_varchar_after_delete AFTER DELETE ON mg_catalog_product_entity_varchar FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (OLD.`entity_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_product_frontend_action`
--

CREATE TABLE `mg_catalog_product_frontend_action` (
  `action_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Product Action ID',
  `type_id` varchar(64) NOT NULL COMMENT 'Type of product action',
  `visitor_id` int(10) unsigned DEFAULT NULL COMMENT 'Visitor ID',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `added_at` bigint(20) NOT NULL COMMENT 'Added At',
  PRIMARY KEY (`action_id`),
  UNIQUE KEY `mg_CAT_PRD_FRONTEND_ACTION_VISITOR_ID_PRD_ID_TYPE_ID` (`visitor_id`,`product_id`,`type_id`),
  UNIQUE KEY `mg_CAT_PRD_FRONTEND_ACTION_CSTR_ID_PRD_ID_TYPE_ID` (`customer_id`,`product_id`,`type_id`),
  KEY `mg_CAT_PRD_FRONTEND_ACTION_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` (`product_id`),
  CONSTRAINT `mg_CAT_PRD_FRONTEND_ACTION_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_FRONTEND_ACTION_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Frontend Action Table';

--
-- Dumping data for table `mg_catalog_product_frontend_action`
--


--
-- Table structure for table `mg_catalog_product_index_eav`
--

CREATE TABLE `mg_catalog_product_index_eav` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` int(10) unsigned NOT NULL COMMENT 'Value',
  `source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Original entity ID for attribute value',
  PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product EAV Index Table';

--
-- Dumping data for table `mg_catalog_product_index_eav`
--

INSERT INTO `mg_catalog_product_index_eav` VALUES (1,99,1,4,1),(2,99,1,4,2),(3,99,1,4,3);

--
-- Table structure for table `mg_catalog_product_index_eav_decimal`
--

CREATE TABLE `mg_catalog_product_index_eav_decimal` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` decimal(12,4) NOT NULL COMMENT 'Value',
  `source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Original entity ID for attribute value',
  PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product EAV Decimal Index Table';

--
-- Dumping data for table `mg_catalog_product_index_eav_decimal`
--


--
-- Table structure for table `mg_catalog_product_index_eav_decimal_idx`
--

CREATE TABLE `mg_catalog_product_index_eav_decimal_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` decimal(12,4) NOT NULL COMMENT 'Value',
  `source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Original entity ID for attribute value',
  PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_IDX_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_IDX_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_IDX_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product EAV Decimal Indexer Index Table';

--
-- Dumping data for table `mg_catalog_product_index_eav_decimal_idx`
--


--
-- Table structure for table `mg_catalog_product_index_eav_decimal_replica`
--

CREATE TABLE `mg_catalog_product_index_eav_decimal_replica` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` decimal(12,4) NOT NULL COMMENT 'Value',
  `source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Original entity ID for attribute value',
  PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product EAV Decimal Index Table';

--
-- Dumping data for table `mg_catalog_product_index_eav_decimal_replica`
--


--
-- Table structure for table `mg_catalog_product_index_eav_decimal_tmp`
--

CREATE TABLE `mg_catalog_product_index_eav_decimal_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` decimal(12,4) NOT NULL COMMENT 'Value',
  `source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Original entity ID for attribute value',
  PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_DECIMAL_TMP_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product EAV Decimal Indexer Temp Table';

--
-- Dumping data for table `mg_catalog_product_index_eav_decimal_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_eav_idx`
--

CREATE TABLE `mg_catalog_product_index_eav_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` int(10) unsigned NOT NULL COMMENT 'Value',
  `source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Original entity ID for attribute value',
  PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_IDX_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_IDX_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_IDX_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product EAV Indexer Index Table';

--
-- Dumping data for table `mg_catalog_product_index_eav_idx`
--


--
-- Table structure for table `mg_catalog_product_index_eav_replica`
--

CREATE TABLE `mg_catalog_product_index_eav_replica` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` int(10) unsigned NOT NULL COMMENT 'Value',
  `source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Original entity ID for attribute value',
  PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product EAV Index Table';

--
-- Dumping data for table `mg_catalog_product_index_eav_replica`
--

INSERT INTO `mg_catalog_product_index_eav_replica` VALUES (1,99,1,4,1),(2,99,1,4,2),(3,99,1,4,3);

--
-- Table structure for table `mg_catalog_product_index_eav_tmp`
--

CREATE TABLE `mg_catalog_product_index_eav_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` int(10) unsigned NOT NULL COMMENT 'Value',
  `source_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Original entity ID for attribute value',
  PRIMARY KEY (`entity_id`,`attribute_id`,`store_id`,`value`,`source_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_TMP_ATTRIBUTE_ID` (`attribute_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_TMP_STORE_ID` (`store_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_EAV_TMP_VALUE` (`value`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product EAV Indexer Temp Table';

--
-- Dumping data for table `mg_catalog_product_index_eav_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price`
--

CREATE TABLE `mg_catalog_product_index_price` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `final_price` decimal(20,6) DEFAULT NULL COMMENT 'Final Price',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_PRICE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_PRICE_MIN_PRICE` (`min_price`),
  KEY `mg_CAT_PRD_IDX_PRICE_WS_ID_CSTR_GROUP_ID_MIN_PRICE` (`website_id`,`customer_group_id`,`min_price`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Index Table';

--
-- Dumping data for table `mg_catalog_product_index_price`
--

INSERT INTO `mg_catalog_product_index_price` VALUES (1,0,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(1,1,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(1,2,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(1,3,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(2,0,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(2,1,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(2,2,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(2,3,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(3,0,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(3,1,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(3,2,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(3,3,1,2,1.000000,1.000000,1.000000,1.000000,NULL);

--
-- Table structure for table `mg_catalog_product_index_price_bundle_idx`
--

CREATE TABLE `mg_catalog_product_index_price_bundle_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(11) NOT NULL,
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
  `price_type` smallint(5) unsigned NOT NULL COMMENT 'Price Type',
  `special_price` decimal(20,6) DEFAULT NULL COMMENT 'Special Price',
  `tier_percent` decimal(20,6) DEFAULT NULL COMMENT 'Tier Percent',
  `orig_price` decimal(20,6) DEFAULT NULL COMMENT 'Orig Price',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  `base_tier` decimal(20,6) DEFAULT NULL COMMENT 'Base Tier',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Index Price Bundle Idx';

--
-- Dumping data for table `mg_catalog_product_index_price_bundle_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_bundle_opt_idx`
--

CREATE TABLE `mg_catalog_product_index_price_bundle_opt_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(11) NOT NULL,
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `alt_price` decimal(20,6) DEFAULT NULL COMMENT 'Alt Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  `alt_tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Alt Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`,`option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Index Price Bundle Opt Idx';

--
-- Dumping data for table `mg_catalog_product_index_price_bundle_opt_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_bundle_opt_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_bundle_opt_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(11) NOT NULL,
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `alt_price` decimal(20,6) DEFAULT NULL COMMENT 'Alt Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  `alt_tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Alt Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`,`option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Index Price Bundle Opt Tmp';

--
-- Dumping data for table `mg_catalog_product_index_price_bundle_opt_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_bundle_sel_idx`
--

CREATE TABLE `mg_catalog_product_index_price_bundle_sel_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(11) NOT NULL,
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `selection_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Selection ID',
  `group_type` smallint(5) unsigned DEFAULT '0' COMMENT 'Group Type',
  `is_required` smallint(5) unsigned DEFAULT '0' COMMENT 'Is Required',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`,`option_id`,`selection_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Index Price Bundle Sel Idx';

--
-- Dumping data for table `mg_catalog_product_index_price_bundle_sel_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_bundle_sel_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_bundle_sel_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(11) NOT NULL,
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `selection_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Selection ID',
  `group_type` smallint(5) unsigned DEFAULT '0' COMMENT 'Group Type',
  `is_required` smallint(5) unsigned DEFAULT '0' COMMENT 'Is Required',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`,`option_id`,`selection_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Index Price Bundle Sel Tmp';

--
-- Dumping data for table `mg_catalog_product_index_price_bundle_sel_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_bundle_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_bundle_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(11) NOT NULL,
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
  `price_type` smallint(5) unsigned NOT NULL COMMENT 'Price Type',
  `special_price` decimal(20,6) DEFAULT NULL COMMENT 'Special Price',
  `tier_percent` decimal(20,6) DEFAULT NULL COMMENT 'Tier Percent',
  `orig_price` decimal(20,6) DEFAULT NULL COMMENT 'Orig Price',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  `base_tier` decimal(20,6) DEFAULT NULL COMMENT 'Base Tier',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Index Price Bundle Tmp';

--
-- Dumping data for table `mg_catalog_product_index_price_bundle_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_cfg_opt_agr_idx`
--

CREATE TABLE `mg_catalog_product_index_price_cfg_opt_agr_idx` (
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',
  `child_id` int(10) unsigned NOT NULL COMMENT 'Child ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`parent_id`,`child_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Config Option Aggregate Index Table';

--
-- Dumping data for table `mg_catalog_product_index_price_cfg_opt_agr_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_cfg_opt_agr_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_cfg_opt_agr_tmp` (
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',
  `child_id` int(10) unsigned NOT NULL COMMENT 'Child ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`parent_id`,`child_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Config Option Aggregate Temp Table';

--
-- Dumping data for table `mg_catalog_product_index_price_cfg_opt_agr_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_cfg_opt_idx`
--

CREATE TABLE `mg_catalog_product_index_price_cfg_opt_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Config Option Index Table';

--
-- Dumping data for table `mg_catalog_product_index_price_cfg_opt_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_cfg_opt_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_cfg_opt_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Config Option Temp Table';

--
-- Dumping data for table `mg_catalog_product_index_price_cfg_opt_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_downlod_idx`
--

CREATE TABLE `mg_catalog_product_index_price_downlod_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(11) NOT NULL,
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `min_price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Minimum price',
  `max_price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Maximum price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Indexer Table for price of downloadable products';

--
-- Dumping data for table `mg_catalog_product_index_price_downlod_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_downlod_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_downlod_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(11) NOT NULL,
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `min_price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Minimum price',
  `max_price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Maximum price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Temporary Indexer Table for price of downloadable products';

--
-- Dumping data for table `mg_catalog_product_index_price_downlod_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_final_idx`
--

CREATE TABLE `mg_catalog_product_index_price_final_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
  `orig_price` decimal(20,6) DEFAULT NULL COMMENT 'Original Price',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  `base_tier` decimal(20,6) DEFAULT NULL COMMENT 'Base Tier',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Final Index Table';

--
-- Dumping data for table `mg_catalog_product_index_price_final_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_final_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_final_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
  `orig_price` decimal(20,6) DEFAULT NULL COMMENT 'Original Price',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  `base_tier` decimal(20,6) DEFAULT NULL COMMENT 'Base Tier',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Final Temp Table';

--
-- Dumping data for table `mg_catalog_product_index_price_final_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_idx`
--

CREATE TABLE `mg_catalog_product_index_price_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `final_price` decimal(20,6) DEFAULT NULL COMMENT 'Final Price',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_PRICE_IDX_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_PRICE_IDX_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_PRICE_IDX_MIN_PRICE` (`min_price`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Index Table';

--
-- Dumping data for table `mg_catalog_product_index_price_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_opt_agr_idx`
--

CREATE TABLE `mg_catalog_product_index_price_opt_agr_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`,`option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Option Aggregate Index Table';

--
-- Dumping data for table `mg_catalog_product_index_price_opt_agr_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_opt_agr_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_opt_agr_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`,`option_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Option Aggregate Temp Table';

--
-- Dumping data for table `mg_catalog_product_index_price_opt_agr_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_opt_idx`
--

CREATE TABLE `mg_catalog_product_index_price_opt_idx` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Option Index Table';

--
-- Dumping data for table `mg_catalog_product_index_price_opt_idx`
--


--
-- Table structure for table `mg_catalog_product_index_price_opt_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_opt_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Option Temp Table';

--
-- Dumping data for table `mg_catalog_product_index_price_opt_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_price_replica`
--

CREATE TABLE `mg_catalog_product_index_price_replica` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `final_price` decimal(20,6) DEFAULT NULL COMMENT 'Final Price',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_PRICE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_PRICE_MIN_PRICE` (`min_price`),
  KEY `mg_CAT_PRD_IDX_PRICE_WS_ID_CSTR_GROUP_ID_MIN_PRICE` (`website_id`,`customer_group_id`,`min_price`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Index Table';

--
-- Dumping data for table `mg_catalog_product_index_price_replica`
--

INSERT INTO `mg_catalog_product_index_price_replica` VALUES (1,0,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(1,1,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(1,2,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(1,3,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(2,0,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(2,1,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(2,2,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(2,3,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(3,0,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(3,1,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(3,2,1,2,1.000000,1.000000,1.000000,1.000000,NULL),(3,3,1,2,1.000000,1.000000,1.000000,1.000000,NULL);

--
-- Table structure for table `mg_catalog_product_index_price_tmp`
--

CREATE TABLE `mg_catalog_product_index_price_tmp` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `tax_class_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Tax Class ID',
  `price` decimal(20,6) DEFAULT NULL COMMENT 'Price',
  `final_price` decimal(20,6) DEFAULT NULL COMMENT 'Final Price',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  `max_price` decimal(20,6) DEFAULT NULL COMMENT 'Max Price',
  `tier_price` decimal(20,6) DEFAULT NULL COMMENT 'Tier Price',
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  PRIMARY KEY (`id`),
  KEY `mg_CAT_PRD_IDX_PRICE_TMP_ENTT_ID_CSTR_GROUP_ID_WS_ID` (`entity_id`,`customer_group_id`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Price Indexer Temp Table';

--
-- Dumping data for table `mg_catalog_product_index_price_tmp`
--


--
-- Table structure for table `mg_catalog_product_index_tier_price`
--

CREATE TABLE `mg_catalog_product_index_tier_price` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `customer_group_id` int(10) unsigned NOT NULL COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `min_price` decimal(20,6) DEFAULT NULL COMMENT 'Min Price',
  PRIMARY KEY (`entity_id`,`customer_group_id`,`website_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_TIER_PRICE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_TIER_PRICE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `FK_B5F4EAD8C3E324EFDD39EC478242EB98` FOREIGN KEY (`customer_group_id`) REFERENCES `mg_customer_group` (`customer_group_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_IDX_TIER_PRICE_ENTT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_IDX_TIER_PRICE_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Tier Price Index Table';

--
-- Dumping data for table `mg_catalog_product_index_tier_price`
--


--
-- Table structure for table `mg_catalog_product_index_website`
--

CREATE TABLE `mg_catalog_product_index_website` (
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `default_store_id` smallint(5) unsigned NOT NULL COMMENT 'Default store ID for website',
  `website_date` date DEFAULT NULL COMMENT 'Website Date',
  `rate` float DEFAULT '1' COMMENT 'Rate',
  PRIMARY KEY (`website_id`),
  KEY `mg_CATALOG_PRODUCT_INDEX_WEBSITE_WEBSITE_DATE` (`website_date`),
  CONSTRAINT `mg_CAT_PRD_IDX_WS_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Website Index Table';

--
-- Dumping data for table `mg_catalog_product_index_website`
--

INSERT INTO `mg_catalog_product_index_website` VALUES (1,1,'2026-01-26',1);

--
-- Table structure for table `mg_catalog_product_link`
--

CREATE TABLE `mg_catalog_product_link` (
  `link_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Link ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `linked_product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Linked Product ID',
  `link_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Link Type ID',
  PRIMARY KEY (`link_id`),
  UNIQUE KEY `mg_CAT_PRD_LNK_LNK_TYPE_ID_PRD_ID_LNKED_PRD_ID` (`link_type_id`,`product_id`,`linked_product_id`),
  KEY `mg_CATALOG_PRODUCT_LINK_PRODUCT_ID` (`product_id`),
  KEY `mg_CATALOG_PRODUCT_LINK_LINKED_PRODUCT_ID` (`linked_product_id`),
  CONSTRAINT `mg_CAT_PRD_LNK_LNKED_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`linked_product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_LNK_LNK_TYPE_ID_mg_CAT_PRD_LNK_TYPE_LNK_TYPE_ID` FOREIGN KEY (`link_type_id`) REFERENCES `mg_catalog_product_link_type` (`link_type_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_LNK_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product To Product Linkage Table';

--
-- Dumping data for table `mg_catalog_product_link`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_link_after_insert AFTER INSERT ON mg_catalog_product_link FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (NEW.`product_id`);
INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`product_id`);
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`product_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`product_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_link_after_update AFTER UPDATE ON mg_catalog_product_link FOR EACH ROW
BEGIN
IF (NOT(NEW.`link_id` <=> OLD.`link_id`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`linked_product_id` <=> OLD.`linked_product_id`) OR NOT(NEW.`link_type_id` <=> OLD.`link_type_id`)) THEN INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (NEW.`product_id`); END IF;
IF (NOT(NEW.`link_id` <=> OLD.`link_id`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`linked_product_id` <=> OLD.`linked_product_id`) OR NOT(NEW.`link_type_id` <=> OLD.`link_type_id`)) THEN INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (NEW.`product_id`); END IF;
IF (NOT(NEW.`link_id` <=> OLD.`link_id`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`linked_product_id` <=> OLD.`linked_product_id`) OR NOT(NEW.`link_type_id` <=> OLD.`link_type_id`)) THEN INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`product_id`); END IF;
IF (NOT(NEW.`link_id` <=> OLD.`link_id`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`linked_product_id` <=> OLD.`linked_product_id`) OR NOT(NEW.`link_type_id` <=> OLD.`link_type_id`)) THEN INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (NEW.`product_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_link_after_delete AFTER DELETE ON mg_catalog_product_link FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (OLD.`product_id`);
INSERT IGNORE INTO `mg_catalog_product_attribute_cl` (`entity_id`) VALUES (OLD.`product_id`);
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (OLD.`product_id`);
INSERT IGNORE INTO `mg_catalogrule_product_cl` (`entity_id`) VALUES (OLD.`product_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_product_link_attribute`
--

CREATE TABLE `mg_catalog_product_link_attribute` (
  `product_link_attribute_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Product Link Attribute ID',
  `link_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Link Type ID',
  `product_link_attribute_code` varchar(32) DEFAULT NULL COMMENT 'Product Link Attribute Code',
  `data_type` varchar(32) DEFAULT NULL COMMENT 'Data Type',
  PRIMARY KEY (`product_link_attribute_id`),
  KEY `mg_CATALOG_PRODUCT_LINK_ATTRIBUTE_LINK_TYPE_ID` (`link_type_id`),
  CONSTRAINT `FK_6946D902CC8431204910BA8ACA07646E` FOREIGN KEY (`link_type_id`) REFERENCES `mg_catalog_product_link_type` (`link_type_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Link Attribute Table';

--
-- Dumping data for table `mg_catalog_product_link_attribute`
--

INSERT INTO `mg_catalog_product_link_attribute` VALUES (1,1,'position','int'),(2,4,'position','int'),(3,5,'position','int'),(4,3,'position','int'),(5,3,'qty','decimal');

--
-- Table structure for table `mg_catalog_product_link_attribute_decimal`
--

CREATE TABLE `mg_catalog_product_link_attribute_decimal` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `product_link_attribute_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Product Link Attribute ID',
  `link_id` int(10) unsigned NOT NULL COMMENT 'Link ID',
  `value` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_LNK_ATTR_DEC_PRD_LNK_ATTR_ID_LNK_ID` (`product_link_attribute_id`,`link_id`),
  KEY `mg_CATALOG_PRODUCT_LINK_ATTRIBUTE_DECIMAL_LINK_ID` (`link_id`),
  CONSTRAINT `FK_C7215B63AEA163696BAE20693BBA6320` FOREIGN KEY (`product_link_attribute_id`) REFERENCES `mg_catalog_product_link_attribute` (`product_link_attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_LNK_ATTR_DEC_LNK_ID_mg_CAT_PRD_LNK_LNK_ID` FOREIGN KEY (`link_id`) REFERENCES `mg_catalog_product_link` (`link_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Link Decimal Attribute Table';

--
-- Dumping data for table `mg_catalog_product_link_attribute_decimal`
--


--
-- Table structure for table `mg_catalog_product_link_attribute_int`
--

CREATE TABLE `mg_catalog_product_link_attribute_int` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `product_link_attribute_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Product Link Attribute ID',
  `link_id` int(10) unsigned NOT NULL COMMENT 'Link ID',
  `value` int(11) NOT NULL DEFAULT '0' COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_LNK_ATTR_INT_PRD_LNK_ATTR_ID_LNK_ID` (`product_link_attribute_id`,`link_id`),
  KEY `mg_CATALOG_PRODUCT_LINK_ATTRIBUTE_INT_LINK_ID` (`link_id`),
  CONSTRAINT `FK_C24274BF61458AC4D15D6ACA5E4FFB0D` FOREIGN KEY (`product_link_attribute_id`) REFERENCES `mg_catalog_product_link_attribute` (`product_link_attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_LNK_ATTR_INT_LNK_ID_mg_CAT_PRD_LNK_LNK_ID` FOREIGN KEY (`link_id`) REFERENCES `mg_catalog_product_link` (`link_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Link Integer Attribute Table';

--
-- Dumping data for table `mg_catalog_product_link_attribute_int`
--


--
-- Table structure for table `mg_catalog_product_link_attribute_varchar`
--

CREATE TABLE `mg_catalog_product_link_attribute_varchar` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `product_link_attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Product Link Attribute ID',
  `link_id` int(10) unsigned NOT NULL COMMENT 'Link ID',
  `value` varchar(255) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_LNK_ATTR_VCHR_PRD_LNK_ATTR_ID_LNK_ID` (`product_link_attribute_id`,`link_id`),
  KEY `mg_CATALOG_PRODUCT_LINK_ATTRIBUTE_VARCHAR_LINK_ID` (`link_id`),
  CONSTRAINT `FK_354A177E3753C94DD1197BA543387F14` FOREIGN KEY (`product_link_attribute_id`) REFERENCES `mg_catalog_product_link_attribute` (`product_link_attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_LNK_ATTR_VCHR_LNK_ID_mg_CAT_PRD_LNK_LNK_ID` FOREIGN KEY (`link_id`) REFERENCES `mg_catalog_product_link` (`link_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Link Varchar Attribute Table';

--
-- Dumping data for table `mg_catalog_product_link_attribute_varchar`
--


--
-- Table structure for table `mg_catalog_product_link_type`
--

CREATE TABLE `mg_catalog_product_link_type` (
  `link_type_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Link Type ID',
  `code` varchar(32) DEFAULT NULL COMMENT 'Code',
  PRIMARY KEY (`link_type_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Link Type Table';

--
-- Dumping data for table `mg_catalog_product_link_type`
--

INSERT INTO `mg_catalog_product_link_type` VALUES (1,'relation'),(3,'super'),(4,'up_sell'),(5,'cross_sell');

--
-- Table structure for table `mg_catalog_product_option`
--

CREATE TABLE `mg_catalog_product_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `type` varchar(50) DEFAULT NULL COMMENT 'Type',
  `is_require` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Is Required',
  `sku` varchar(64) DEFAULT NULL COMMENT 'SKU',
  `max_characters` int(10) unsigned DEFAULT NULL COMMENT 'Max Characters',
  `file_extension` varchar(50) DEFAULT NULL COMMENT 'File Extension',
  `image_size_x` smallint(5) unsigned DEFAULT NULL COMMENT 'Image Size X',
  `image_size_y` smallint(5) unsigned DEFAULT NULL COMMENT 'Image Size Y',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  PRIMARY KEY (`option_id`),
  KEY `mg_CATALOG_PRODUCT_OPTION_PRODUCT_ID` (`product_id`),
  CONSTRAINT `mg_CAT_PRD_OPT_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Option Table';

--
-- Dumping data for table `mg_catalog_product_option`
--


--
-- Table structure for table `mg_catalog_product_option_price`
--

CREATE TABLE `mg_catalog_product_option_price` (
  `option_price_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Price ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Price',
  `price_type` varchar(7) NOT NULL DEFAULT 'fixed' COMMENT 'Price Type',
  PRIMARY KEY (`option_price_id`),
  UNIQUE KEY `mg_CATALOG_PRODUCT_OPTION_PRICE_OPTION_ID_STORE_ID` (`option_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_OPTION_PRICE_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CATALOG_PRODUCT_OPTION_PRICE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_OPT_PRICE_OPT_ID_mg_CAT_PRD_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `mg_catalog_product_option` (`option_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Option Price Table';

--
-- Dumping data for table `mg_catalog_product_option_price`
--


--
-- Table structure for table `mg_catalog_product_option_title`
--

CREATE TABLE `mg_catalog_product_option_title` (
  `option_title_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Title ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  PRIMARY KEY (`option_title_id`),
  UNIQUE KEY `mg_CATALOG_PRODUCT_OPTION_TITLE_OPTION_ID_STORE_ID` (`option_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_OPTION_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CATALOG_PRODUCT_OPTION_TITLE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_OPT_TTL_OPT_ID_mg_CAT_PRD_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `mg_catalog_product_option` (`option_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Option Title Table';

--
-- Dumping data for table `mg_catalog_product_option_title`
--


--
-- Table structure for table `mg_catalog_product_option_type_price`
--

CREATE TABLE `mg_catalog_product_option_type_price` (
  `option_type_price_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Type Price ID',
  `option_type_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option Type ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Price',
  `price_type` varchar(7) NOT NULL DEFAULT 'fixed' COMMENT 'Price Type',
  PRIMARY KEY (`option_type_price_id`),
  UNIQUE KEY `mg_CATALOG_PRODUCT_OPTION_TYPE_PRICE_OPTION_TYPE_ID_STORE_ID` (`option_type_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_OPTION_TYPE_PRICE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_C1D2EE02EC6AAB7541FB09DDDCD68C8D` FOREIGN KEY (`option_type_id`) REFERENCES `mg_catalog_product_option_type_value` (`option_type_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_OPT_TYPE_PRICE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Option Type Price Table';

--
-- Dumping data for table `mg_catalog_product_option_type_price`
--


--
-- Table structure for table `mg_catalog_product_option_type_title`
--

CREATE TABLE `mg_catalog_product_option_type_title` (
  `option_type_title_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Type Title ID',
  `option_type_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option Type ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `title` varchar(255) DEFAULT NULL COMMENT 'Title',
  PRIMARY KEY (`option_type_title_id`),
  UNIQUE KEY `mg_CATALOG_PRODUCT_OPTION_TYPE_TITLE_OPTION_TYPE_ID_STORE_ID` (`option_type_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_OPTION_TYPE_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_1A200B10431B157F71F40DE8911C3B51` FOREIGN KEY (`option_type_id`) REFERENCES `mg_catalog_product_option_type_value` (`option_type_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_OPT_TYPE_TTL_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Option Type Title Table';

--
-- Dumping data for table `mg_catalog_product_option_type_title`
--


--
-- Table structure for table `mg_catalog_product_option_type_value`
--

CREATE TABLE `mg_catalog_product_option_type_value` (
  `option_type_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option Type ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Option ID',
  `sku` varchar(64) DEFAULT NULL COMMENT 'SKU',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  PRIMARY KEY (`option_type_id`),
  KEY `mg_CATALOG_PRODUCT_OPTION_TYPE_VALUE_OPTION_ID` (`option_id`),
  CONSTRAINT `mg_CAT_PRD_OPT_TYPE_VAL_OPT_ID_mg_CAT_PRD_OPT_OPT_ID` FOREIGN KEY (`option_id`) REFERENCES `mg_catalog_product_option` (`option_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Option Type Value Table';

--
-- Dumping data for table `mg_catalog_product_option_type_value`
--


--
-- Table structure for table `mg_catalog_product_price_cl`
--

CREATE TABLE `mg_catalog_product_price_cl` (
  `version_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Version ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  PRIMARY KEY (`version_id`)
) ENGINE=InnoDB AUTO_INCREMENT=94 DEFAULT CHARSET=utf8mb4 COMMENT='mg_catalog_product_price_cl';

--
-- Dumping data for table `mg_catalog_product_price_cl`
--

INSERT INTO `mg_catalog_product_price_cl` VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1),(14,1),(15,1),(16,1),(17,1),(18,1),(19,1),(20,1),(21,2),(22,2),(23,2),(24,2),(25,2),(26,2),(27,2),(28,2),(29,2),(30,2),(31,1),(32,1),(33,1),(34,2),(35,2),(36,2),(37,3),(38,3),(39,3),(40,3),(41,3),(42,3),(43,3),(44,3),(45,3),(46,3),(47,3),(48,2),(49,2),(50,2),(51,2),(52,2),(53,3),(54,3),(55,3),(56,3),(57,3),(58,2),(59,2),(60,2),(61,2),(62,2),(63,2),(64,2),(65,2),(66,2),(67,2),(68,2),(69,2),(70,2),(71,2),(72,2),(73,2),(74,2),(75,2),(76,2),(77,2),(78,2),(79,3),(80,3),(81,3),(82,2),(83,2),(84,2),(85,2),(86,2),(87,2),(88,3),(89,3),(90,3),(91,2),(92,2),(93,2);

--
-- Table structure for table `mg_catalog_product_relation`
--

CREATE TABLE `mg_catalog_product_relation` (
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',
  `child_id` int(10) unsigned NOT NULL COMMENT 'Child ID',
  PRIMARY KEY (`parent_id`,`child_id`),
  KEY `mg_CATALOG_PRODUCT_RELATION_CHILD_ID` (`child_id`),
  CONSTRAINT `mg_CAT_PRD_RELATION_CHILD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`child_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_RELATION_PARENT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`parent_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Relation Table';

--
-- Dumping data for table `mg_catalog_product_relation`
--


--
-- Table structure for table `mg_catalog_product_super_attribute`
--

CREATE TABLE `mg_catalog_product_super_attribute` (
  `product_super_attribute_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Product Super Attribute ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `attribute_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Attribute ID',
  `position` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Position',
  PRIMARY KEY (`product_super_attribute_id`),
  UNIQUE KEY `mg_CATALOG_PRODUCT_SUPER_ATTRIBUTE_PRODUCT_ID_ATTRIBUTE_ID` (`product_id`,`attribute_id`),
  CONSTRAINT `mg_CAT_PRD_SPR_ATTR_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Super Attribute Table';

--
-- Dumping data for table `mg_catalog_product_super_attribute`
--


--
-- Table structure for table `mg_catalog_product_super_attribute_label`
--

CREATE TABLE `mg_catalog_product_super_attribute_label` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `product_super_attribute_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product Super Attribute ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `use_default` smallint(5) unsigned DEFAULT '0' COMMENT 'Use Default Value',
  `value` varchar(255) DEFAULT NULL COMMENT 'Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_CAT_PRD_SPR_ATTR_LBL_PRD_SPR_ATTR_ID_STORE_ID` (`product_super_attribute_id`,`store_id`),
  KEY `mg_CATALOG_PRODUCT_SUPER_ATTRIBUTE_LABEL_STORE_ID` (`store_id`),
  CONSTRAINT `FK_6BFFEDF008562DE6CB595734062A19F2` FOREIGN KEY (`product_super_attribute_id`) REFERENCES `mg_catalog_product_super_attribute` (`product_super_attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_SPR_ATTR_LBL_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Super Attribute Label Table';

--
-- Dumping data for table `mg_catalog_product_super_attribute_label`
--


--
-- Table structure for table `mg_catalog_product_super_link`
--

CREATE TABLE `mg_catalog_product_super_link` (
  `link_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Link ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Parent ID',
  PRIMARY KEY (`link_id`),
  UNIQUE KEY `mg_CATALOG_PRODUCT_SUPER_LINK_PRODUCT_ID_PARENT_ID` (`product_id`,`parent_id`),
  KEY `mg_CATALOG_PRODUCT_SUPER_LINK_PARENT_ID` (`parent_id`),
  CONSTRAINT `mg_CAT_PRD_SPR_LNK_PARENT_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`parent_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_SPR_LNK_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product Super Link Table';

--
-- Dumping data for table `mg_catalog_product_super_link`
--


--
-- Table structure for table `mg_catalog_product_website`
--

CREATE TABLE `mg_catalog_product_website` (
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  PRIMARY KEY (`product_id`,`website_id`),
  KEY `mg_CATALOG_PRODUCT_WEBSITE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `mg_CAT_PRD_WS_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_PRD_WS_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Product To Website Linkage Table';

--
-- Dumping data for table `mg_catalog_product_website`
--

INSERT INTO `mg_catalog_product_website` VALUES (1,1),(2,1),(3,1);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_website_after_insert AFTER INSERT ON mg_catalog_product_website FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`product_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_website_after_update AFTER UPDATE ON mg_catalog_product_website FOR EACH ROW
BEGIN
IF (NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`website_id` <=> OLD.`website_id`)) THEN INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`product_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalog_product_website_after_delete AFTER DELETE ON mg_catalog_product_website FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (OLD.`product_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalog_url_rewrite_product_category`
--

CREATE TABLE `mg_catalog_url_rewrite_product_category` (
  `url_rewrite_id` int(10) unsigned NOT NULL COMMENT 'url_rewrite_id',
  `category_id` int(10) unsigned NOT NULL COMMENT 'category_id',
  `product_id` int(10) unsigned NOT NULL COMMENT 'product_id',
  PRIMARY KEY (`url_rewrite_id`),
  KEY `mg_CAT_URL_REWRITE_PRD_CTGR_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` (`product_id`),
  KEY `mg_CATALOG_URL_REWRITE_PRODUCT_CATEGORY_CATEGORY_ID_PRODUCT_ID` (`category_id`,`product_id`),
  CONSTRAINT `FK_29535502FDF24B4A7C55872B1E85C865` FOREIGN KEY (`url_rewrite_id`) REFERENCES `mg_url_rewrite` (`url_rewrite_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_URL_REWRITE_PRD_CTGR_CTGR_ID_mg_CAT_CTGR_ENTT_ENTT_ID` FOREIGN KEY (`category_id`) REFERENCES `mg_catalog_category_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CAT_URL_REWRITE_PRD_CTGR_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='url_rewrite_relation';

--
-- Dumping data for table `mg_catalog_url_rewrite_product_category`
--


--
-- Table structure for table `mg_cataloginventory_stock`
--

CREATE TABLE `mg_cataloginventory_stock` (
  `stock_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Stock ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `stock_name` varchar(255) DEFAULT NULL COMMENT 'Stock Name',
  PRIMARY KEY (`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='Cataloginventory Stock';

--
-- Dumping data for table `mg_cataloginventory_stock`
--

INSERT INTO `mg_cataloginventory_stock` VALUES (1,0,'Default');

--
-- Table structure for table `mg_cataloginventory_stock_cl`
--

CREATE TABLE `mg_cataloginventory_stock_cl` (
  `version_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Version ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  PRIMARY KEY (`version_id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COMMENT='mg_cataloginventory_stock_cl';

--
-- Dumping data for table `mg_cataloginventory_stock_cl`
--

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

--
-- Table structure for table `mg_cataloginventory_stock_item`
--

CREATE TABLE `mg_cataloginventory_stock_item` (
  `item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `stock_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Stock ID',
  `qty` decimal(12,4) DEFAULT NULL COMMENT 'Qty',
  `min_qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Min Qty',
  `use_config_min_qty` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Use Config Min Qty',
  `is_qty_decimal` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Qty Decimal',
  `backorders` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Backorders',
  `use_config_backorders` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Use Config Backorders',
  `min_sale_qty` decimal(12,4) NOT NULL DEFAULT '1.0000' COMMENT 'Min Sale Qty',
  `use_config_min_sale_qty` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Use Config Min Sale Qty',
  `max_sale_qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Max Sale Qty',
  `use_config_max_sale_qty` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Use Config Max Sale Qty',
  `is_in_stock` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is In Stock',
  `low_stock_date` timestamp NULL DEFAULT NULL COMMENT 'Low Stock Date',
  `notify_stock_qty` decimal(12,4) DEFAULT NULL COMMENT 'Notify Stock Qty',
  `use_config_notify_stock_qty` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Use Config Notify Stock Qty',
  `manage_stock` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Manage Stock',
  `use_config_manage_stock` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Use Config Manage Stock',
  `stock_status_changed_auto` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Stock Status Changed Automatically',
  `use_config_qty_increments` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Use Config Qty Increments',
  `qty_increments` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Increments',
  `use_config_enable_qty_inc` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Use Config Enable Qty Increments',
  `enable_qty_increments` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Enable Qty Increments',
  `is_decimal_divided` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Divided into Multiple Boxes for Shipping',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  PRIMARY KEY (`item_id`),
  UNIQUE KEY `mg_CATALOGINVENTORY_STOCK_ITEM_PRODUCT_ID_STOCK_ID` (`product_id`,`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_ITEM_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_ITEM_WEBSITE_ID_PRODUCT_ID` (`website_id`,`product_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_ITEM_STOCK_ID` (`stock_id`),
  CONSTRAINT `mg_CATINV_STOCK_ITEM_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CATINV_STOCK_ITEM_STOCK_ID_mg_CATINV_STOCK_STOCK_ID` FOREIGN KEY (`stock_id`) REFERENCES `mg_cataloginventory_stock` (`stock_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='Cataloginventory Stock Item';

--
-- Dumping data for table `mg_cataloginventory_stock_item`
--

INSERT INTO `mg_cataloginventory_stock_item` VALUES (1,1,1,100.0000,0.0000,1,0,0,1,1.0000,1,10000.0000,1,1,NULL,1.0000,1,1,1,0,1,1.0000,1,0,0,0),(2,2,1,150.0000,0.0000,0,0,2,0,1.0000,1,10000.0000,1,1,NULL,1.0000,1,1,0,0,1,1.0000,1,0,0,0),(3,3,1,100.0000,0.0000,1,0,1,0,1.0000,1,10000.0000,1,1,NULL,1.0000,1,1,0,0,1,1.0000,1,0,0,0);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_cataloginventory_stock_item_after_insert` AFTER INSERT ON `mg_cataloginventory_stock_item` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (NEW.`product_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_cataloginventory_stock_item_after_update` AFTER UPDATE ON `mg_cataloginventory_stock_item` FOR EACH ROW BEGIN
IF (NOT(NEW.`item_id` <=> OLD.`item_id`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`stock_id` <=> OLD.`stock_id`) OR NOT(NEW.`qty` <=> OLD.`qty`) OR NOT(NEW.`min_qty` <=> OLD.`min_qty`) OR NOT(NEW.`use_config_min_qty` <=> OLD.`use_config_min_qty`) OR NOT(NEW.`is_qty_decimal` <=> OLD.`is_qty_decimal`) OR NOT(NEW.`backorders` <=> OLD.`backorders`) OR NOT(NEW.`use_config_backorders` <=> OLD.`use_config_backorders`) OR NOT(NEW.`min_sale_qty` <=> OLD.`min_sale_qty`) OR NOT(NEW.`use_config_min_sale_qty` <=> OLD.`use_config_min_sale_qty`) OR NOT(NEW.`max_sale_qty` <=> OLD.`max_sale_qty`) OR NOT(NEW.`use_config_max_sale_qty` <=> OLD.`use_config_max_sale_qty`) OR NOT(NEW.`is_in_stock` <=> OLD.`is_in_stock`) OR NOT(NEW.`low_stock_date` <=> OLD.`low_stock_date`) OR NOT(NEW.`notify_stock_qty` <=> OLD.`notify_stock_qty`) OR NOT(NEW.`use_config_notify_stock_qty` <=> OLD.`use_config_notify_stock_qty`) OR NOT(NEW.`manage_stock` <=> OLD.`manage_stock`) OR NOT(NEW.`use_config_manage_stock` <=> OLD.`use_config_manage_stock`) OR NOT(NEW.`stock_status_changed_auto` <=> OLD.`stock_status_changed_auto`) OR NOT(NEW.`use_config_qty_increments` <=> OLD.`use_config_qty_increments`) OR NOT(NEW.`qty_increments` <=> OLD.`qty_increments`) OR NOT(NEW.`use_config_enable_qty_inc` <=> OLD.`use_config_enable_qty_inc`) OR NOT(NEW.`enable_qty_increments` <=> OLD.`enable_qty_increments`) OR NOT(NEW.`is_decimal_divided` <=> OLD.`is_decimal_divided`) OR NOT(NEW.`website_id` <=> OLD.`website_id`)) THEN INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (NEW.`product_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_cataloginventory_stock_item_after_delete` AFTER DELETE ON `mg_cataloginventory_stock_item` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_cataloginventory_stock_cl` (`entity_id`) VALUES (OLD.`product_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_cataloginventory_stock_status`
--

CREATE TABLE `mg_cataloginventory_stock_status` (
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `stock_id` smallint(5) unsigned NOT NULL COMMENT 'Stock ID',
  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty',
  `stock_status` smallint(5) unsigned NOT NULL COMMENT 'Stock Status',
  PRIMARY KEY (`product_id`,`website_id`,`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_STOCK_ID` (`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_STOCK_STATUS` (`stock_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Cataloginventory Stock Status';

--
-- Dumping data for table `mg_cataloginventory_stock_status`
--

INSERT INTO `mg_cataloginventory_stock_status` VALUES (1,0,1,100.0000,1),(2,0,1,150.0000,1),(3,0,1,100.0000,1);

--
-- Table structure for table `mg_cataloginventory_stock_status_idx`
--

CREATE TABLE `mg_cataloginventory_stock_status_idx` (
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `stock_id` smallint(5) unsigned NOT NULL COMMENT 'Stock ID',
  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty',
  `stock_status` smallint(5) unsigned NOT NULL COMMENT 'Stock Status',
  PRIMARY KEY (`product_id`,`website_id`,`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_IDX_STOCK_ID` (`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_IDX_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Cataloginventory Stock Status Indexer Idx';

--
-- Dumping data for table `mg_cataloginventory_stock_status_idx`
--


--
-- Table structure for table `mg_cataloginventory_stock_status_replica`
--

CREATE TABLE `mg_cataloginventory_stock_status_replica` (
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `stock_id` smallint(5) unsigned NOT NULL COMMENT 'Stock ID',
  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty',
  `stock_status` smallint(5) unsigned NOT NULL COMMENT 'Stock Status',
  PRIMARY KEY (`product_id`,`website_id`,`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_STOCK_ID` (`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_STOCK_STATUS` (`stock_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Cataloginventory Stock Status';

--
-- Dumping data for table `mg_cataloginventory_stock_status_replica`
--

INSERT INTO `mg_cataloginventory_stock_status_replica` VALUES (1,0,1,100.0000,1),(2,0,1,150.0000,1),(3,0,1,100.0000,1);

--
-- Table structure for table `mg_cataloginventory_stock_status_tmp`
--

CREATE TABLE `mg_cataloginventory_stock_status_tmp` (
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `stock_id` smallint(5) unsigned NOT NULL COMMENT 'Stock ID',
  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty',
  `stock_status` smallint(5) unsigned NOT NULL COMMENT 'Stock Status',
  PRIMARY KEY (`product_id`,`website_id`,`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_TMP_STOCK_ID` (`stock_id`),
  KEY `mg_CATALOGINVENTORY_STOCK_STATUS_TMP_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Cataloginventory Stock Status Indexer Tmp';

--
-- Dumping data for table `mg_cataloginventory_stock_status_tmp`
--


--
-- Table structure for table `mg_catalogrule`
--

CREATE TABLE `mg_catalogrule` (
  `rule_id` int(10) 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',
  `is_active` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Is Active',
  `conditions_serialized` mediumtext COMMENT 'Conditions Serialized',
  `actions_serialized` mediumtext COMMENT 'Actions Serialized',
  `stop_rules_processing` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Stop Rules Processing',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `simple_action` varchar(32) DEFAULT NULL COMMENT 'Simple Action',
  `discount_amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Discount Amount',
  PRIMARY KEY (`rule_id`),
  KEY `mg_CATALOGRULE_IS_ACTIVE_SORT_ORDER_TO_DATE_FROM_DATE` (`is_active`,`sort_order`,`to_date`,`from_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CatalogRule';

--
-- Dumping data for table `mg_catalogrule`
--


--
-- Table structure for table `mg_catalogrule_customer_group`
--

CREATE TABLE `mg_catalogrule_customer_group` (
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule ID',
  `customer_group_id` int(10) unsigned NOT NULL COMMENT 'Customer Group ID',
  PRIMARY KEY (`rule_id`,`customer_group_id`),
  KEY `mg_CATALOGRULE_CUSTOMER_GROUP_CUSTOMER_GROUP_ID` (`customer_group_id`),
  CONSTRAINT `FK_CA21557BCA029C0082FC60E8C5C923DB` FOREIGN KEY (`customer_group_id`) REFERENCES `mg_customer_group` (`customer_group_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CATALOGRULE_CUSTOMER_GROUP_RULE_ID_mg_CATALOGRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `mg_catalogrule` (`rule_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Rules To Customer Groups Relations';

--
-- Dumping data for table `mg_catalogrule_customer_group`
--


--
-- Table structure for table `mg_catalogrule_group_website`
--

CREATE TABLE `mg_catalogrule_group_website` (
  `rule_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Rule ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  PRIMARY KEY (`rule_id`,`customer_group_id`,`website_id`),
  KEY `mg_CATALOGRULE_GROUP_WEBSITE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOGRULE_GROUP_WEBSITE_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CatalogRule Group Website';

--
-- Dumping data for table `mg_catalogrule_group_website`
--


--
-- Table structure for table `mg_catalogrule_group_website_replica`
--

CREATE TABLE `mg_catalogrule_group_website_replica` (
  `rule_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Rule ID',
  `customer_group_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer Group ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  PRIMARY KEY (`rule_id`,`customer_group_id`,`website_id`),
  KEY `mg_CATALOGRULE_GROUP_WEBSITE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOGRULE_GROUP_WEBSITE_WEBSITE_ID` (`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CatalogRule Group Website';

--
-- Dumping data for table `mg_catalogrule_group_website_replica`
--


--
-- Table structure for table `mg_catalogrule_product`
--

CREATE TABLE `mg_catalogrule_product` (
  `rule_product_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule Product ID',
  `rule_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Rule ID',
  `from_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'From Time',
  `to_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'To time',
  `customer_group_id` int(11) DEFAULT NULL,
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `action_operator` varchar(10) DEFAULT 'to_fixed' COMMENT 'Action Operator',
  `action_amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Action Amount',
  `action_stop` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Action Stop',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  PRIMARY KEY (`rule_product_id`),
  UNIQUE KEY `UNQ_657F2C47A3462448AF8A19A447783F01` (`rule_id`,`from_time`,`to_time`,`website_id`,`customer_group_id`,`product_id`,`sort_order`),
  KEY `mg_CATALOGRULE_PRODUCT_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOGRULE_PRODUCT_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOGRULE_PRODUCT_FROM_TIME` (`from_time`),
  KEY `mg_CATALOGRULE_PRODUCT_TO_TIME` (`to_time`),
  KEY `mg_CATALOGRULE_PRODUCT_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CatalogRule Product';

--
-- Dumping data for table `mg_catalogrule_product`
--


--
-- Table structure for table `mg_catalogrule_product_cl`
--

CREATE TABLE `mg_catalogrule_product_cl` (
  `version_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Version ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  PRIMARY KEY (`version_id`)
) ENGINE=InnoDB AUTO_INCREMENT=166 DEFAULT CHARSET=utf8mb4 COMMENT='mg_catalogrule_product_cl';

--
-- Dumping data for table `mg_catalogrule_product_cl`
--

INSERT INTO `mg_catalogrule_product_cl` VALUES (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1),(14,1),(15,1),(16,1),(17,1),(18,1),(19,1),(20,1),(21,1),(22,1),(23,1),(24,1),(25,1),(26,1),(27,1),(28,1),(29,1),(30,1),(31,1),(32,1),(33,1),(34,1),(35,1),(36,1),(37,1),(38,1),(39,1),(40,1),(41,1),(42,1),(43,2),(44,2),(45,2),(46,2),(47,2),(48,2),(49,2),(50,2),(51,2),(52,2),(53,2),(54,2),(55,2),(56,2),(57,2),(58,2),(59,2),(60,2),(61,2),(62,2),(63,2),(64,2),(65,2),(66,2),(67,2),(68,2),(69,2),(70,2),(71,2),(72,2),(73,2),(74,1),(75,1),(76,1),(77,1),(78,2),(79,2),(80,2),(81,2),(82,3),(83,3),(84,3),(85,3),(86,3),(87,3),(88,3),(89,3),(90,3),(91,3),(92,3),(93,3),(94,3),(95,3),(96,3),(97,3),(98,3),(99,3),(100,3),(101,3),(102,3),(103,3),(104,3),(105,3),(106,3),(107,3),(108,3),(109,3),(110,3),(111,3),(112,2),(113,2),(114,2),(115,3),(116,3),(117,3),(118,2),(119,2),(120,2),(121,2),(122,2),(123,2),(124,2),(125,2),(126,2),(127,2),(128,2),(129,2),(130,2),(131,3),(132,3),(133,3),(134,2),(135,2),(136,2),(137,2),(138,2),(139,2),(140,2),(141,2),(142,2),(143,2),(144,2),(145,2),(146,2),(147,2),(148,3),(149,3),(150,3),(151,3),(152,3),(153,3),(154,3),(155,3),(156,3),(157,3),(158,3),(159,2),(160,2),(161,2),(162,2),(163,2),(164,2),(165,2);

--
-- Table structure for table `mg_catalogrule_product_price`
--

CREATE TABLE `mg_catalogrule_product_price` (
  `rule_product_price_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule Product PriceId',
  `rule_date` date NOT NULL COMMENT 'Rule Date',
  `customer_group_id` int(11) DEFAULT NULL,
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `rule_price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Rule Price',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `latest_start_date` date DEFAULT NULL COMMENT 'Latest StartDate',
  `earliest_end_date` date DEFAULT NULL COMMENT 'Earliest EndDate',
  PRIMARY KEY (`rule_product_price_id`),
  UNIQUE KEY `mg_CATRULE_PRD_PRICE_RULE_DATE_WS_ID_CSTR_GROUP_ID_PRD_ID` (`rule_date`,`website_id`,`customer_group_id`,`product_id`),
  KEY `mg_CATALOGRULE_PRODUCT_PRICE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOGRULE_PRODUCT_PRICE_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOGRULE_PRODUCT_PRICE_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CatalogRule Product Price';

--
-- Dumping data for table `mg_catalogrule_product_price`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalogrule_product_price_after_insert AFTER INSERT ON mg_catalogrule_product_price FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`product_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalogrule_product_price_after_update AFTER UPDATE ON mg_catalogrule_product_price FOR EACH ROW
BEGIN
IF (NOT(NEW.`rule_product_price_id` <=> OLD.`rule_product_price_id`) OR NOT(NEW.`rule_date` <=> OLD.`rule_date`) OR NOT(NEW.`customer_group_id` <=> OLD.`customer_group_id`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`rule_price` <=> OLD.`rule_price`) OR NOT(NEW.`website_id` <=> OLD.`website_id`) OR NOT(NEW.`latest_start_date` <=> OLD.`latest_start_date`) OR NOT(NEW.`earliest_end_date` <=> OLD.`earliest_end_date`)) THEN INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (NEW.`product_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER trg_mg_catalogrule_product_price_after_delete AFTER DELETE ON mg_catalogrule_product_price FOR EACH ROW
BEGIN
INSERT IGNORE INTO `mg_catalog_product_price_cl` (`entity_id`) VALUES (OLD.`product_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_catalogrule_product_price_replica`
--

CREATE TABLE `mg_catalogrule_product_price_replica` (
  `rule_product_price_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule Product PriceId',
  `rule_date` date NOT NULL COMMENT 'Rule Date',
  `customer_group_id` int(11) DEFAULT NULL,
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `rule_price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Rule Price',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `latest_start_date` date DEFAULT NULL COMMENT 'Latest StartDate',
  `earliest_end_date` date DEFAULT NULL COMMENT 'Earliest EndDate',
  PRIMARY KEY (`rule_product_price_id`),
  UNIQUE KEY `mg_CATRULE_PRD_PRICE_RULE_DATE_WS_ID_CSTR_GROUP_ID_PRD_ID` (`rule_date`,`website_id`,`customer_group_id`,`product_id`),
  KEY `mg_CATALOGRULE_PRODUCT_PRICE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOGRULE_PRODUCT_PRICE_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOGRULE_PRODUCT_PRICE_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CatalogRule Product Price';

--
-- Dumping data for table `mg_catalogrule_product_price_replica`
--


--
-- Table structure for table `mg_catalogrule_product_replica`
--

CREATE TABLE `mg_catalogrule_product_replica` (
  `rule_product_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule Product ID',
  `rule_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Rule ID',
  `from_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'From Time',
  `to_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'To time',
  `customer_group_id` int(11) DEFAULT NULL,
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `action_operator` varchar(10) DEFAULT 'to_fixed' COMMENT 'Action Operator',
  `action_amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Action Amount',
  `action_stop` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Action Stop',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  PRIMARY KEY (`rule_product_id`),
  UNIQUE KEY `UNQ_657F2C47A3462448AF8A19A447783F01` (`rule_id`,`from_time`,`to_time`,`website_id`,`customer_group_id`,`product_id`,`sort_order`),
  KEY `mg_CATALOGRULE_PRODUCT_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_CATALOGRULE_PRODUCT_WEBSITE_ID` (`website_id`),
  KEY `mg_CATALOGRULE_PRODUCT_FROM_TIME` (`from_time`),
  KEY `mg_CATALOGRULE_PRODUCT_TO_TIME` (`to_time`),
  KEY `mg_CATALOGRULE_PRODUCT_PRODUCT_ID` (`product_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='CatalogRule Product';

--
-- Dumping data for table `mg_catalogrule_product_replica`
--


--
-- Table structure for table `mg_catalogrule_website`
--

CREATE TABLE `mg_catalogrule_website` (
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  PRIMARY KEY (`rule_id`,`website_id`),
  KEY `mg_CATALOGRULE_WEBSITE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `mg_CATALOGRULE_WEBSITE_RULE_ID_mg_CATALOGRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `mg_catalogrule` (`rule_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CATRULE_WS_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Catalog Rules To Websites Relations';

--
-- Dumping data for table `mg_catalogrule_website`
--


--
-- Table structure for table `mg_catalogsearch_recommendations`
--

CREATE TABLE `mg_catalogsearch_recommendations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `query_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Query ID',
  `relation_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Relation ID',
  PRIMARY KEY (`id`),
  KEY `mg_CATSRCH_RECOMMENDATIONS_QR_ID_mg_SRCH_QR_QR_ID` (`query_id`),
  KEY `mg_CATSRCH_RECOMMENDATIONS_RELATION_ID_mg_SRCH_QR_QR_ID` (`relation_id`),
  CONSTRAINT `mg_CATSRCH_RECOMMENDATIONS_QR_ID_mg_SRCH_QR_QR_ID` FOREIGN KEY (`query_id`) REFERENCES `mg_search_query` (`query_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CATSRCH_RECOMMENDATIONS_RELATION_ID_mg_SRCH_QR_QR_ID` FOREIGN KEY (`relation_id`) REFERENCES `mg_search_query` (`query_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Advanced Search Recommendations';

--
-- Dumping data for table `mg_catalogsearch_recommendations`
--


--
-- Table structure for table `mg_checkout_agreement`
--

CREATE TABLE `mg_checkout_agreement` (
  `agreement_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Agreement ID',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `content` text COMMENT 'Content',
  `content_height` varchar(25) DEFAULT NULL COMMENT 'Content Height',
  `checkbox_text` text COMMENT 'Checkbox Text',
  `is_active` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Is Active',
  `is_html` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Is Html',
  `mode` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Applied mode',
  PRIMARY KEY (`agreement_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Checkout Agreement';

--
-- Dumping data for table `mg_checkout_agreement`
--


--
-- Table structure for table `mg_checkout_agreement_store`
--

CREATE TABLE `mg_checkout_agreement_store` (
  `agreement_id` int(10) unsigned NOT NULL COMMENT 'Agreement ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`agreement_id`,`store_id`),
  KEY `mg_CHECKOUT_AGREEMENT_STORE_STORE_ID_mg_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `mg_CHECKOUT_AGREEMENT_STORE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_CHKT_AGRT_STORE_AGRT_ID_mg_CHKT_AGRT_AGRT_ID` FOREIGN KEY (`agreement_id`) REFERENCES `mg_checkout_agreement` (`agreement_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Checkout Agreement Store';

--
