-- Table structure for table `mg_pagebuilder_template`
--

CREATE TABLE `mg_pagebuilder_template` (
  `template_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Template ID Auto Increment',
  `name` varchar(1024) NOT NULL COMMENT 'Template Name',
  `preview_image` varchar(1024) DEFAULT NULL COMMENT 'Template Preview Image',
  `template` longtext NOT NULL COMMENT 'Master Format HTML',
  `created_for` varchar(255) DEFAULT NULL COMMENT 'Created For',
  `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 (`template_id`),
  FULLTEXT KEY `mg_PAGEBUILDER_TEMPLATE_NAME` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Page Builder Templates';

--
-- Dumping data for table `mg_pagebuilder_template`
--


--
-- Table structure for table `mg_password_reset_request_event`
--

CREATE TABLE `mg_password_reset_request_event` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `request_type` smallint(5) unsigned NOT NULL COMMENT 'Type of the event under a security control',
  `account_reference` varchar(255) DEFAULT NULL COMMENT 'An identifier for existing account or another target',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Timestamp when the event occurs',
  `ip` varchar(15) NOT NULL COMMENT 'Remote user IP',
  PRIMARY KEY (`id`),
  KEY `mg_PASSWORD_RESET_REQUEST_EVENT_ACCOUNT_REFERENCE` (`account_reference`),
  KEY `mg_PASSWORD_RESET_REQUEST_EVENT_CREATED_AT` (`created_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Password Reset Request Event under a security control';

--
-- Dumping data for table `mg_password_reset_request_event`
--


--
-- Table structure for table `mg_patch_list`
--

CREATE TABLE `mg_patch_list` (
  `patch_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Patch Auto Increment',
  `patch_name` varchar(1024) NOT NULL COMMENT 'Patch Class Name',
  PRIMARY KEY (`patch_id`)
) ENGINE=InnoDB AUTO_INCREMENT=185 DEFAULT CHARSET=utf8mb4 COMMENT='List of data/schema patches';

--
-- Dumping data for table `mg_patch_list`
--

INSERT INTO `mg_patch_list` VALUES (1,'Magento\\Store\\Setup\\Patch\\Schema\\InitializeStoresAndWebsites'),(2,'Magento\\Catalog\\Setup\\Patch\\Schema\\EnableSegmentation'),(3,'Magento\\CatalogRule\\Setup\\Patch\\Schema\\CleanUpProductPriceReplicaTable'),(4,'Magento\\TwoFactorAuth\\Setup\\Patch\\Schema\\CopyTablesFromOldModule'),(5,'Magento\\Bundle\\Setup\\Patch\\Schema\\UpdateBundleRelatedSchema'),(6,'Magento\\InventoryCatalog\\Setup\\Patch\\Schema\\CreateLegacyStockStatusView'),(7,'Magento\\InventoryCatalog\\Setup\\Patch\\Schema\\InitializeDefaultStock'),(8,'Magento\\InventoryCatalog\\Setup\\Patch\\Schema\\UpdateInventorySourceItem'),(9,'Magento\\InventoryCatalog\\Setup\\Patch\\Schema\\ReindexDefaultSource'),(10,'Magento\\InventorySales\\Setup\\Patch\\Schema\\InitializeWebsiteDefaultSock'),(11,'Magento\\Review\\Setup\\Patch\\Schema\\AddUniqueConstraintToReviewEntitySummary'),(12,'Magento\\Store\\Setup\\Patch\\Data\\DisableSid'),(13,'Magento\\Store\\Setup\\Patch\\Data\\UpdateStoreGroupCodes'),(14,'Magento\\Directory\\Setup\\Patch\\Data\\InitializeDirectoryData'),(15,'Magento\\Directory\\Setup\\Patch\\Data\\AddCountriesCaribbeanCuracaoKosovoSintMaarten'),(16,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForAlbania'),(17,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForArgentina'),(18,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForCroatia'),(19,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForIndia'),(20,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForAustralia'),(21,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForBelarus'),(22,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForBelgium'),(23,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForBolivia'),(24,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForBulgaria'),(25,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForChile'),(26,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForChina'),(27,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForColombia'),(28,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForCostaRica'),(29,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForCzechia'),(30,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForDenmark'),(31,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForEcuador'),(32,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForGreece'),(33,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForGuyana'),(34,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForIceland'),(35,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForItaly'),(36,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForMexico'),(37,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForParaguay'),(38,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForPeru'),(39,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForPoland'),(40,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForPortugal'),(41,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForSuriname'),(42,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForSweden'),(43,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForUkraine'),(44,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForUruguay'),(45,'Magento\\Directory\\Setup\\Patch\\Data\\AddDataForVenezuela'),(46,'Magento\\Directory\\Setup\\Patch\\Data\\AddRegionsForIndia'),(47,'Magento\\Directory\\Setup\\Patch\\Data\\UpdateRegionNamesForSwitzerland'),(48,'Magento\\Theme\\Setup\\Patch\\Data\\RegisterThemes'),(49,'Magento\\Theme\\Setup\\Patch\\Data\\ConvertSerializedData'),(50,'Magento\\Security\\Setup\\Patch\\Data\\SessionIDColumnCleanUp'),(51,'Magento\\Config\\Setup\\Patch\\Data\\RemoveTinymceConfig'),(52,'Magento\\Config\\Setup\\Patch\\Data\\UnsetTinymce3'),(53,'Magento\\Config\\Setup\\Patch\\Data\\UpdateClassAliases'),(54,'Magento\\User\\Setup\\Patch\\Data\\UpgradePasswordHashes'),(55,'Magento\\User\\Setup\\Patch\\Data\\UpgradeSerializedFields'),(56,'Magento\\Authorization\\Setup\\Patch\\Data\\InitializeAuthRoles'),(57,'Magento\\Eav\\Setup\\Patch\\Data\\InitializeAttributeModels'),(58,'Magento\\Customer\\Setup\\Patch\\Data\\DefaultCustomerGroupsAndAttributes'),(59,'Magento\\Customer\\Setup\\Patch\\Data\\UpdateCustomerAttributesMetadata'),(60,'Magento\\Customer\\Setup\\Patch\\Data\\AddNonSpecifiedGenderAttributeOption'),(61,'Magento\\Customer\\Setup\\Patch\\Data\\UpdateIdentifierCustomerAttributesVisibility'),(62,'Magento\\Customer\\Setup\\Patch\\Data\\AddCustomerUpdatedAtAttribute'),(63,'Magento\\Customer\\Setup\\Patch\\Data\\UpgradePasswordHashAndAddress'),(64,'Magento\\Customer\\Setup\\Patch\\Data\\RemoveCheckoutRegisterAndUpdateAttributes'),(65,'Magento\\Customer\\Setup\\Patch\\Data\\AddSecurityTrackingAttributes'),(66,'Magento\\Customer\\Setup\\Patch\\Data\\UpdateAutocompleteOnStorefrontConfigPath'),(67,'Magento\\Customer\\Setup\\Patch\\Data\\MigrateStoresAllowedCountriesToWebsite'),(68,'Magento\\Customer\\Setup\\Patch\\Data\\ConvertValidationRulesFromSerializedToJson'),(69,'Magento\\Customer\\Setup\\Patch\\Data\\SessionIDColumnCleanUp'),(70,'Magento\\Customer\\Setup\\Patch\\Data\\UpdateCustomerAddressAttributesSortOrder'),(71,'Magento\\Customer\\Setup\\Patch\\Data\\UpdateVATNumber'),(72,'Magento\\Customer\\Setup\\Patch\\Data\\UpdateCustomerAttributeInputFilters'),(73,'Magento\\Customer\\Setup\\Patch\\Data\\UpdateDefaultCustomerGroupInConfig'),(74,'Magento\\Indexer\\Setup\\Patch\\Data\\InitializeIndexerState'),(75,'Magento\\Cms\\Setup\\Patch\\Data\\CreateDefaultPages'),(76,'Magento\\Cms\\Setup\\Patch\\Data\\UpdatePrivacyPolicyPage'),(77,'Magento\\Cms\\Setup\\Patch\\Data\\ConvertWidgetConditionsToJson'),(78,'Magento\\Integration\\Setup\\Patch\\Data\\RemoveInactiveTokens'),(79,'Magento\\Integration\\Setup\\Patch\\Data\\UpgradeConsumerSecret'),(80,'Magento\\Integration\\Setup\\Patch\\Data\\UpgradeOauthToken'),(81,'Magento\\Catalog\\Setup\\Patch\\Data\\InstallDefaultCategories'),(82,'Magento\\Catalog\\Setup\\Patch\\Data\\SetNewResourceModelsPaths'),(83,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateDefaultAttributeValue'),(84,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateMediaAttributesBackendTypes'),(85,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateProductAttributes'),(86,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateProductMetaDescription'),(87,'Magento\\Catalog\\Setup\\Patch\\Data\\ChangePriceAttributeDefaultScope'),(88,'Magento\\Catalog\\Setup\\Patch\\Data\\DisallowUsingHtmlForProductName'),(89,'Magento\\Catalog\\Setup\\Patch\\Data\\EnableDirectiveParsing'),(90,'Magento\\Catalog\\Setup\\Patch\\Data\\EnableSegmentation'),(91,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateCustomLayoutAttributes'),(92,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateDefaultSortyByBackendType'),(93,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateMultiselectAttributesBackendTypes'),(94,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateProductDescriptionOrder'),(95,'Magento\\CatalogUrlRewrite\\Setup\\Patch\\Data\\CreateUrlAttributes'),(96,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateProductUrlKey'),(97,'Magento\\Catalog\\Setup\\Patch\\Data\\UpdateProductUrlKeyBackendModel'),(98,'Magento\\Catalog\\Setup\\Patch\\Data\\UpgradeWidgetData'),(99,'Magento\\Catalog\\Setup\\Patch\\Data\\UpgradeWebsiteAttributes'),(100,'Magento\\CatalogInventory\\Setup\\Patch\\Data\\CreateDefaultStock'),(101,'Magento\\CatalogInventory\\Setup\\Patch\\Data\\UpdateStockItemsWebsite'),(102,'Magento\\CatalogInventory\\Setup\\Patch\\Data\\ConvertSerializedDataToJson'),(103,'Magento\\CatalogRule\\Setup\\Patch\\Data\\UpdateClassAliasesForCatalogRules'),(104,'Magento\\CatalogRule\\Setup\\Patch\\Data\\ConvertSerializedDataToJson'),(105,'Magento\\Msrp\\Setup\\Patch\\Data\\InitializeMsrpAttributes'),(106,'Magento\\Msrp\\Setup\\Patch\\Data\\ChangeMsrpAttributeLabel'),(107,'Magento\\Msrp\\Setup\\Patch\\Data\\ChangePriceAttributeDefaultScope'),(108,'Magento\\CatalogSearch\\Setup\\Patch\\Data\\MySQLSearchRemovalNotification'),(109,'Magento\\CatalogSearch\\Setup\\Patch\\Data\\SetInitialSearchWeightForAttributes'),(110,'Magento\\CatalogUrlRewrite\\Setup\\Patch\\Data\\UpdateUrlKeyForProducts'),(111,'Magento\\CatalogUrlRewrite\\Setup\\Patch\\Data\\UpdateUrlKeySearchable'),(112,'Magento\\Quote\\Setup\\Patch\\Data\\InstallEntityTypes'),(113,'Magento\\Quote\\Setup\\Patch\\Data\\ConvertSerializedDataToJson'),(114,'Magento\\Quote\\Setup\\Patch\\Data\\WishlistDataCleanUp'),(115,'Magento\\MediaGalleryUi\\Setup\\Patch\\Data\\AddMediaGalleryPermissions'),(116,'Magento\\TwoFactorAuth\\Setup\\Patch\\Data\\CopyConfigFromOldModule'),(117,'Magento\\TwoFactorAuth\\Setup\\Patch\\Data\\EncryptConfiguration'),(118,'Magento\\TwoFactorAuth\\Setup\\Patch\\Data\\EncryptGoogleSecrets'),(119,'Magento\\TwoFactorAuth\\Setup\\Patch\\Data\\EncryptSecrets'),(120,'Magento\\TwoFactorAuth\\Setup\\Patch\\Data\\PopulateCountryTable'),(121,'Magento\\TwoFactorAuth\\Setup\\Patch\\Data\\ResetU2fConfig'),(122,'Magento\\Sales\\Setup\\Patch\\Data\\InstallOrderStatusesAndInitialSalesConfig'),(123,'Magento\\Sales\\Setup\\Patch\\Data\\UpdateEntityTypes'),(124,'Magento\\Sales\\Setup\\Patch\\Data\\ConvertSerializedDataToJson'),(125,'Magento\\Sales\\Setup\\Patch\\Data\\FillQuoteAddressIdInSalesOrderAddress'),(126,'Magento\\Sales\\Setup\\Patch\\Data\\UpdateEntityTypeModelForInvoice'),(127,'Magento\\Sales\\Setup\\Patch\\Data\\WishlistDataCleanUp'),(128,'Magento\\Checkout\\Setup\\Patch\\Data\\PrepareInitialCheckoutConfiguration'),(129,'Magento\\Widget\\Setup\\Patch\\Data\\UpgradeModelInstanceClassAliases'),(130,'Magento\\Widget\\Setup\\Patch\\Data\\ConvertSerializedData'),(131,'Magento\\Analytics\\Setup\\Patch\\Data\\PrepareInitialConfig'),(132,'Magento\\Analytics\\Setup\\Patch\\Data\\ActivateDataCollection'),(133,'Magento\\Downloadable\\Setup\\Patch\\Data\\AddDownloadableHostsConfig'),(134,'Magento\\Downloadable\\Setup\\Patch\\Data\\InstallDownloadableAttributes'),(135,'Magento\\Downloadable\\Setup\\Patch\\Data\\UpdateLinksExistDefaultAttributeValue'),(136,'Magento\\Newsletter\\Setup\\Patch\\Data\\FlagLegacyTemplates'),(137,'Magento\\Dhl\\Setup\\Patch\\Data\\PrepareShipmentDays'),(138,'Magento\\Bundle\\Setup\\Patch\\Data\\ApplyAttributesUpdate'),(139,'Magento\\Bundle\\Setup\\Patch\\Data\\UpdateBundleRelatedEntityTypes'),(140,'Magento\\Elasticsearch\\Setup\\Patch\\Data\\InvalidateIndex'),(141,'Magento\\Email\\Setup\\Patch\\Data\\FlagLegacyTemplates'),(142,'Magento\\EncryptionKey\\Setup\\Patch\\Data\\SodiumChachaPatch'),(143,'Magento\\Fedex\\Setup\\Patch\\Data\\ConfigureFedexDefaults'),(144,'Magento\\GiftMessage\\Setup\\Patch\\Data\\AddGiftMessageAttributes'),(145,'Magento\\GiftMessage\\Setup\\Patch\\Data\\MoveGiftMessageToGiftOptionsGroup'),(146,'Magento\\GiftMessage\\Setup\\Patch\\Data\\UpdateGiftMessageAttribute'),(147,'Magento\\GroupedProduct\\Setup\\Patch\\Data\\InitializeGroupedProductLinks'),(148,'Magento\\GroupedProduct\\Setup\\Patch\\Data\\UpdateProductRelations'),(149,'Magento\\ConfigurableProduct\\Setup\\Patch\\Data\\InstallInitialConfigurableAttributes'),(150,'Magento\\ConfigurableProduct\\Setup\\Patch\\Data\\UpdateManufacturerAttribute'),(151,'Magento\\ConfigurableProduct\\Setup\\Patch\\Data\\UpdateTierPriceAttribute'),(152,'Magento\\InventoryLowQuantityNotification\\Setup\\Patch\\Data\\MigrateCatalogInventoryNotifyStockQuantityData'),(153,'Magento\\Reports\\Setup\\Patch\\Data\\InitializeReportEntityTypesAndPages'),(154,'Magento\\Reports\\Setup\\Patch\\Data\\ReportDisableNotification'),(155,'Magento\\SalesRule\\Setup\\Patch\\Data\\PrepareRuleModelSerializedData'),(156,'Magento\\SalesRule\\Setup\\Patch\\Data\\ConvertSerializedDataToJson'),(157,'Magento\\SalesRule\\Setup\\Patch\\Data\\FillSalesRuleProductAttributeTable'),(158,'Magento\\PageBuilder\\Setup\\Patch\\Data\\UpdateProductAttribute'),(159,'Magento\\PageBuilder\\Setup\\Patch\\Data\\UpgradePageBuilderStripStyles'),(160,'Magento\\Vault\\Setup\\Patch\\Data\\SetCreditCardAsDefaultTokenType'),(161,'Magento\\Paypal\\Setup\\Patch\\Data\\AddPaypalOrderStatuses'),(162,'Magento\\Paypal\\Setup\\Patch\\Data\\UpdateBmltoPayLater'),(163,'Magento\\Paypal\\Setup\\Patch\\Data\\UpdatePaypalCreditOption'),(164,'Magento\\Paypal\\Setup\\Patch\\Data\\UpdateSmartButtonLabel'),(165,'Magento\\Paypal\\Setup\\Patch\\Data\\UpdateSmartButtonSize'),(166,'Magento\\ServicesId\\Setup\\Patch\\Data\\RemoveKeySetEncryptedConfigFlag'),(167,'Magento\\ReCaptchaMigration\\Setup\\Patch\\Data\\MigrateConfigToRecaptchaModules'),(168,'Magento\\Review\\Setup\\Patch\\Data\\InitReviewStatusesAndData'),(169,'Magento\\OfflineShipping\\Setup\\Patch\\Data\\UpdateQuoteShippingAddresses'),(170,'Magento\\OfflineShipping\\Setup\\Patch\\Data\\UpdateShippingTablerate'),(171,'Magento\\UrlRewrite\\Setup\\Patch\\Data\\ConvertSerializedDataToJson'),(172,'Magento\\Swatches\\Setup\\Patch\\Data\\AddSwatchImageAttribute'),(173,'Magento\\Swatches\\Setup\\Patch\\Data\\AddSwatchImageToDefaultAttribtueSet'),(174,'Magento\\Swatches\\Setup\\Patch\\Data\\UpdateAdminTextSwatchValues'),(175,'Magento\\Swatches\\Setup\\Patch\\Data\\ConvertAdditionalDataToJson'),(176,'Magento\\Tax\\Setup\\Patch\\Data\\AddTaxAttributeAndTaxClasses'),(177,'Magento\\Tax\\Setup\\Patch\\Data\\UpdateTaxClassAttributeVisibility'),(178,'Magento\\Tax\\Setup\\Patch\\Data\\UpdateTaxRegionId'),(179,'Magento\\SampleData\\Setup\\Patch\\Data\\ClearSampleDataState'),(180,'Magento\\Usps\\Setup\\Patch\\Data\\UpdateAllowedMethods'),(181,'Magento\\Weee\\Setup\\Patch\\Data\\InitQuoteAndOrderAttributes'),(182,'Magento\\CurrencySymbol\\Setup\\Patch\\Data\\ConvertSerializedCustomCurrencySymbolToJson'),(183,'Magento\\Wishlist\\Setup\\Patch\\Data\\ConvertSerializedData'),(184,'Magento\\Wishlist\\Setup\\Patch\\Data\\WishlistDataCleanUp');

--
-- Table structure for table `mg_payment_services_order_data_production_submitted_hash`
--

CREATE TABLE `mg_payment_services_order_data_production_submitted_hash` (
  `identifier` varchar(64) NOT NULL COMMENT 'Order identifier',
  `feed_hash` varchar(64) NOT NULL COMMENT 'feed_hash',
  `submitted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Submitted At',
  PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Payment Services Order Feed Storage';

--
-- Dumping data for table `mg_payment_services_order_data_production_submitted_hash`
--


--
-- Table structure for table `mg_payment_services_order_data_sandbox_submitted_hash`
--

CREATE TABLE `mg_payment_services_order_data_sandbox_submitted_hash` (
  `identifier` varchar(64) NOT NULL COMMENT 'Order identifier',
  `feed_hash` varchar(64) NOT NULL COMMENT 'feed_hash',
  `submitted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Submitted At',
  PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Payment Services Order Feed Storage';

--
-- Dumping data for table `mg_payment_services_order_data_sandbox_submitted_hash`
--


--
-- Table structure for table `mg_payment_services_order_status_data_prod_submitted_hash`
--

CREATE TABLE `mg_payment_services_order_status_data_prod_submitted_hash` (
  `identifier` varchar(64) NOT NULL COMMENT 'Order Status identifier',
  `feed_hash` varchar(64) NOT NULL COMMENT 'feed_hash',
  `submitted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Submitted At',
  PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Payment Services Order Status Feed Storage';

--
-- Dumping data for table `mg_payment_services_order_status_data_prod_submitted_hash`
--


--
-- Table structure for table `mg_payment_services_order_status_data_sandbox_submitted_hash`
--

CREATE TABLE `mg_payment_services_order_status_data_sandbox_submitted_hash` (
  `identifier` varchar(64) NOT NULL COMMENT 'Order Status identifier',
  `feed_hash` varchar(64) NOT NULL COMMENT 'feed_hash',
  `submitted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Submitted At',
  PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Payment Services Order Status Feed Storage';

--
-- Dumping data for table `mg_payment_services_order_status_data_sandbox_submitted_hash`
--


--
-- Table structure for table `mg_payment_services_store_data_production_submitted_hash`
--

CREATE TABLE `mg_payment_services_store_data_production_submitted_hash` (
  `identifier` varchar(64) NOT NULL COMMENT 'Store identifier',
  `feed_hash` varchar(64) NOT NULL COMMENT 'feed_hash',
  `submitted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Submitted At',
  PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Payment Services Store Feed Storage';

--
-- Dumping data for table `mg_payment_services_store_data_production_submitted_hash`
--


--
-- Table structure for table `mg_payment_services_store_data_sandbox_submitted_hash`
--

CREATE TABLE `mg_payment_services_store_data_sandbox_submitted_hash` (
  `identifier` varchar(64) NOT NULL COMMENT 'Store identifier',
  `feed_hash` varchar(64) NOT NULL COMMENT 'feed_hash',
  `submitted_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Submitted At',
  PRIMARY KEY (`identifier`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Payment Services Store Feed Storage';

--
-- Dumping data for table `mg_payment_services_store_data_sandbox_submitted_hash`
--


--
-- Table structure for table `mg_paypal_billing_agreement`
--

CREATE TABLE `mg_paypal_billing_agreement` (
  `agreement_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Agreement ID',
  `customer_id` int(10) unsigned NOT NULL COMMENT 'Customer ID',
  `method_code` varchar(32) NOT NULL COMMENT 'Method Code',
  `reference_id` varchar(32) NOT NULL COMMENT 'Reference ID',
  `status` varchar(20) NOT NULL COMMENT 'Status',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `agreement_label` varchar(255) DEFAULT NULL COMMENT 'Agreement Label',
  PRIMARY KEY (`agreement_id`),
  KEY `mg_PAYPAL_BILLING_AGREEMENT_CUSTOMER_ID` (`customer_id`),
  KEY `mg_PAYPAL_BILLING_AGREEMENT_STORE_ID` (`store_id`),
  CONSTRAINT `mg_PAYPAL_BILLING_AGREEMENT_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL,
  CONSTRAINT `mg_PAYPAL_BILLING_AGRT_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='Sales Billing Agreement';

--
-- Dumping data for table `mg_paypal_billing_agreement`
--


--
-- Table structure for table `mg_paypal_billing_agreement_order`
--

CREATE TABLE `mg_paypal_billing_agreement_order` (
  `agreement_id` int(10) unsigned NOT NULL COMMENT 'Agreement ID',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  PRIMARY KEY (`agreement_id`,`order_id`),
  KEY `mg_PAYPAL_BILLING_AGREEMENT_ORDER_ORDER_ID` (`order_id`),
  CONSTRAINT `FK_9EE0F3B5AE741E1A1BDDF5A663BFCB42` FOREIGN KEY (`agreement_id`) REFERENCES `mg_paypal_billing_agreement` (`agreement_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_PAYPAL_BILLING_AGRT_ORDER_ORDER_ID_mg_SALES_ORDER_ENTT_ID` FOREIGN KEY (`order_id`) REFERENCES `mg_sales_order` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Billing Agreement Order';

--
-- Dumping data for table `mg_paypal_billing_agreement_order`
--


--
-- Table structure for table `mg_paypal_cert`
--

CREATE TABLE `mg_paypal_cert` (
  `cert_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Cert ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `content` text COMMENT 'Content',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  PRIMARY KEY (`cert_id`),
  KEY `mg_PAYPAL_CERT_WEBSITE_ID` (`website_id`),
  CONSTRAINT `mg_PAYPAL_CERT_WEBSITE_ID_mg_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Paypal Certificate Table';

--
-- Dumping data for table `mg_paypal_cert`
--


--
-- Table structure for table `mg_paypal_payment_transaction`
--

CREATE TABLE `mg_paypal_payment_transaction` (
  `transaction_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `txn_id` varchar(100) DEFAULT NULL COMMENT 'Txn ID',
  `additional_information` blob COMMENT 'Additional Information',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  PRIMARY KEY (`transaction_id`),
  UNIQUE KEY `mg_PAYPAL_PAYMENT_TRANSACTION_TXN_ID` (`txn_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='PayPal Payflow Link Payment Transaction';

--
-- Dumping data for table `mg_paypal_payment_transaction`
--


--
-- Table structure for table `mg_paypal_settlement_report`
--

CREATE TABLE `mg_paypal_settlement_report` (
  `report_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Report ID',
  `report_date` date DEFAULT NULL COMMENT 'Report Date',
  `account_id` varchar(64) DEFAULT NULL COMMENT 'Account ID',
  `filename` varchar(24) DEFAULT NULL COMMENT 'Filename',
  `last_modified` timestamp NULL DEFAULT NULL COMMENT 'Last Modified',
  PRIMARY KEY (`report_id`),
  UNIQUE KEY `mg_PAYPAL_SETTLEMENT_REPORT_REPORT_DATE_ACCOUNT_ID` (`report_date`,`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Paypal Settlement Report Table';

--
-- Dumping data for table `mg_paypal_settlement_report`
--


--
-- Table structure for table `mg_paypal_settlement_report_row`
--

CREATE TABLE `mg_paypal_settlement_report_row` (
  `row_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Row ID',
  `report_id` int(10) unsigned NOT NULL COMMENT 'Report ID',
  `transaction_id` varchar(19) DEFAULT NULL COMMENT 'Transaction ID',
  `invoice_id` varchar(127) DEFAULT NULL COMMENT 'Invoice ID',
  `paypal_reference_id` varchar(19) DEFAULT NULL COMMENT 'Paypal Reference ID',
  `paypal_reference_id_type` varchar(3) DEFAULT NULL COMMENT 'Paypal Reference ID Type',
  `transaction_event_code` varchar(5) DEFAULT NULL COMMENT 'Transaction Event Code',
  `transaction_initiation_date` timestamp NULL DEFAULT NULL COMMENT 'Transaction Initiation Date',
  `transaction_completion_date` timestamp NULL DEFAULT NULL COMMENT 'Transaction Completion Date',
  `transaction_debit_or_credit` varchar(2) NOT NULL DEFAULT 'CR' COMMENT 'Transaction Debit Or Credit',
  `gross_transaction_amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Gross Transaction Amount',
  `gross_transaction_currency` varchar(3) DEFAULT NULL COMMENT 'Gross Transaction Currency',
  `fee_debit_or_credit` varchar(2) DEFAULT NULL COMMENT 'Fee Debit Or Credit',
  `fee_amount` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Fee Amount',
  `fee_currency` varchar(3) DEFAULT NULL COMMENT 'Fee Currency',
  `custom_field` varchar(255) DEFAULT NULL COMMENT 'Custom Field',
  `consumer_id` varchar(127) DEFAULT NULL COMMENT 'Consumer ID',
  `payment_tracking_id` varchar(255) DEFAULT NULL COMMENT 'Payment Tracking ID',
  `store_id` varchar(50) DEFAULT NULL COMMENT 'Store ID',
  PRIMARY KEY (`row_id`),
  KEY `mg_PAYPAL_SETTLEMENT_REPORT_ROW_REPORT_ID` (`report_id`),
  CONSTRAINT `FK_4B9222F51A9075175B75AB5C187FBFBF` FOREIGN KEY (`report_id`) REFERENCES `mg_paypal_settlement_report` (`report_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Paypal Settlement Report Row Table';

--
-- Dumping data for table `mg_paypal_settlement_report_row`
--


--
-- Table structure for table `mg_persistent_session`
--

CREATE TABLE `mg_persistent_session` (
  `persistent_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Session ID',
  `key` varchar(50) NOT NULL COMMENT 'Unique cookie key',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `info` text COMMENT 'Session Data',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  PRIMARY KEY (`persistent_id`),
  UNIQUE KEY `mg_PERSISTENT_SESSION_KEY` (`key`),
  UNIQUE KEY `mg_PERSISTENT_SESSION_CUSTOMER_ID` (`customer_id`),
  KEY `mg_PERSISTENT_SESSION_WEBSITE_ID_mg_STORE_WEBSITE_WEBSITE_ID` (`website_id`),
  KEY `mg_PERSISTENT_SESSION_UPDATED_AT` (`updated_at`),
  CONSTRAINT `mg_PERSISTENT_SESSION_WEBSITE_ID_mg_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_PERSISTENT_SESS_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='Persistent Session';

--
-- Dumping data for table `mg_persistent_session`
--


--
-- Table structure for table `mg_product_alert_price`
--

CREATE TABLE `mg_product_alert_price` (
  `alert_price_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Product alert price ID',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `price` decimal(20,6) NOT NULL DEFAULT '0.000000' COMMENT 'Price amount',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `store_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Store ID',
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Product alert add date',
  `last_send_date` timestamp NULL DEFAULT NULL COMMENT 'Product alert last send date',
  `send_count` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Product alert send count',
  `status` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Product alert status',
  PRIMARY KEY (`alert_price_id`),
  KEY `mg_PRODUCT_ALERT_PRICE_CUSTOMER_ID` (`customer_id`),
  KEY `mg_PRODUCT_ALERT_PRICE_PRODUCT_ID` (`product_id`),
  KEY `mg_PRODUCT_ALERT_PRICE_WEBSITE_ID` (`website_id`),
  KEY `mg_PRODUCT_ALERT_PRICE_STORE_ID` (`store_id`),
  CONSTRAINT `mg_PRD_ALERT_PRICE_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_PRD_ALERT_PRICE_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_PRD_ALERT_PRICE_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_PRODUCT_ALERT_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='Product Alert Price';

--
-- Dumping data for table `mg_product_alert_price`
--


--
-- Table structure for table `mg_product_alert_stock`
--

CREATE TABLE `mg_product_alert_stock` (
  `alert_stock_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Product alert stock ID',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `store_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Store ID',
  `add_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Product alert add date',
  `send_date` timestamp NULL DEFAULT NULL COMMENT 'Product alert send date',
  `send_count` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Send Count',
  `status` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Product alert status',
  PRIMARY KEY (`alert_stock_id`),
  KEY `mg_PRODUCT_ALERT_STOCK_CUSTOMER_ID` (`customer_id`),
  KEY `mg_PRODUCT_ALERT_STOCK_PRODUCT_ID` (`product_id`),
  KEY `mg_PRODUCT_ALERT_STOCK_WEBSITE_ID` (`website_id`),
  KEY `mg_PRODUCT_ALERT_STOCK_STORE_ID` (`store_id`),
  CONSTRAINT `mg_PRD_ALERT_STOCK_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_PRD_ALERT_STOCK_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_PRD_ALERT_STOCK_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_PRODUCT_ALERT_STOCK_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Product Alert Stock';

--
-- Dumping data for table `mg_product_alert_stock`
--


--
-- Table structure for table `mg_queue`
--

CREATE TABLE `mg_queue` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Queue ID',
  `name` varchar(255) DEFAULT NULL COMMENT 'Queue name',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_QUEUE_NAME` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COMMENT='Table storing unique queues';

--
-- Dumping data for table `mg_queue`
--

INSERT INTO `mg_queue` VALUES (21,'async.operations.all'),(3,'catalog_website_attribute_value_sync'),(16,'codegenerator'),(5,'export'),(11,'inventory.indexer.sourceItem'),(12,'inventory.indexer.stock'),(7,'inventory.mass.update'),(8,'inventory.reservations.cleanup'),(9,'inventory.reservations.update'),(10,'inventory.reservations.updateSalabilityStatus'),(6,'inventory.source.items.cleanup'),(13,'media.content.synchronization'),(14,'media.gallery.renditions.update'),(15,'media.gallery.synchronization'),(4,'media.storage.catalog.image.resize'),(1,'product_action_attribute.update'),(2,'product_action_attribute.website.update'),(19,'product_alert.queue'),(18,'sales.rule.quote.trigger.recollect'),(17,'sales.rule.update.coupon.usage'),(20,'saveConfig');

--
-- Table structure for table `mg_queue_lock`
--

CREATE TABLE `mg_queue_lock` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Message ID',
  `message_code` varchar(255) NOT NULL DEFAULT '' COMMENT 'Message Code',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_QUEUE_LOCK_MESSAGE_CODE` (`message_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Messages that were processed are inserted here to be locked.';

--
-- Dumping data for table `mg_queue_lock`
--


--
-- Table structure for table `mg_queue_message`
--

CREATE TABLE `mg_queue_message` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Message ID',
  `topic_name` varchar(255) DEFAULT NULL COMMENT 'Message topic',
  `body` longtext COMMENT 'Message body',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='Queue messages';

--
-- Dumping data for table `mg_queue_message`
--

INSERT INTO `mg_queue_message` VALUES (1,'media.storage.catalog.image.resize','{\"id\":null,\"bulk_uuid\":\"322b5792-624b-4f7d-8eef-79dbd6085f82\",\"topic_name\":\"media.storage.catalog.image.resize\",\"serialized_data\":\"{\\\"filename\\\":\\\"\\\\\\/g\\\\\\/r\\\\\\/griferiacocina.jpg\\\"}\",\"result_serialized_data\":null,\"status\":4,\"result_message\":null,\"error_code\":null}'),(2,'media.storage.catalog.image.resize','{\"id\":null,\"bulk_uuid\":\"458a9f20-1f20-4256-bf81-a684c65fb647\",\"topic_name\":\"media.storage.catalog.image.resize\",\"serialized_data\":\"{\\\"filename\\\":\\\"\\\\\\/g\\\\\\/r\\\\\\/griferiacocina_1.jpg\\\"}\",\"result_serialized_data\":null,\"status\":4,\"result_message\":null,\"error_code\":null}'),(3,'media.storage.catalog.image.resize','{\"id\":null,\"bulk_uuid\":\"b837566a-0937-4415-a7ea-bd85bf03587b\",\"topic_name\":\"media.storage.catalog.image.resize\",\"serialized_data\":\"{\\\"filename\\\":\\\"\\\\\\/g\\\\\\/r\\\\\\/griferiacocina_2.jpg\\\"}\",\"result_serialized_data\":null,\"status\":4,\"result_message\":null,\"error_code\":null}'),(4,'media.storage.catalog.image.resize','{\"id\":null,\"bulk_uuid\":\"ff7a6837-8340-43a0-994d-8081dfaa6d83\",\"topic_name\":\"media.storage.catalog.image.resize\",\"serialized_data\":\"{\\\"filename\\\":\\\"\\\\\\/8\\\\\\/2\\\\\\/8289.jpg\\\"}\",\"result_serialized_data\":null,\"status\":4,\"result_message\":null,\"error_code\":null}'),(5,'media.storage.catalog.image.resize','{\"id\":null,\"bulk_uuid\":\"d8dfb3c9-6961-45ea-8f07-8d2c5868fbf8\",\"topic_name\":\"media.storage.catalog.image.resize\",\"serialized_data\":\"{\\\"filename\\\":\\\"\\\\\\/1\\\\\\/0\\\\\\/103863.jpg\\\"}\",\"result_serialized_data\":null,\"status\":4,\"result_message\":null,\"error_code\":null}'),(6,'media.storage.catalog.image.resize','{\"id\":null,\"bulk_uuid\":\"593bf760-de7a-4e6f-baf0-282f348b072f\",\"topic_name\":\"media.storage.catalog.image.resize\",\"serialized_data\":\"{\\\"filename\\\":\\\"\\\\\\/9\\\\\\/7\\\\\\/97950.jpg\\\"}\",\"result_serialized_data\":null,\"status\":4,\"result_message\":null,\"error_code\":null}');

--
-- Table structure for table `mg_queue_message_status`
--

CREATE TABLE `mg_queue_message_status` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Relation ID',
  `queue_id` int(10) unsigned NOT NULL COMMENT 'Queue ID',
  `message_id` bigint(20) unsigned NOT NULL COMMENT 'Message ID',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `status` smallint(5) unsigned NOT NULL COMMENT 'Message status in particular queue',
  `number_of_trials` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Number of trials to processed failed message processing',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_QUEUE_MESSAGE_STATUS_QUEUE_ID_MESSAGE_ID` (`queue_id`,`message_id`),
  KEY `mg_QUEUE_MESSAGE_STATUS_MESSAGE_ID_mg_QUEUE_MESSAGE_ID` (`message_id`),
  KEY `mg_QUEUE_MESSAGE_STATUS_STATUS_UPDATED_AT` (`status`,`updated_at`),
  CONSTRAINT `mg_QUEUE_MESSAGE_STATUS_MESSAGE_ID_mg_QUEUE_MESSAGE_ID` FOREIGN KEY (`message_id`) REFERENCES `mg_queue_message` (`id`) ON DELETE CASCADE,
  CONSTRAINT `mg_QUEUE_MESSAGE_STATUS_QUEUE_ID_mg_QUEUE_ID` FOREIGN KEY (`queue_id`) REFERENCES `mg_queue` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='Relation table to keep associations between queues and messages';

--
-- Dumping data for table `mg_queue_message_status`
--

INSERT INTO `mg_queue_message_status` VALUES (1,4,1,'2025-11-28 18:42:02',2,0),(2,4,2,'2025-12-01 00:22:21',2,0),(3,4,3,'2025-12-01 00:29:12',2,0),(4,4,4,'2026-01-27 18:18:44',2,0),(5,4,5,'2026-01-27 18:19:14',2,0),(6,4,6,'2026-01-27 18:20:05',2,0);

--
-- Table structure for table `mg_queue_poison_pill`
--

CREATE TABLE `mg_queue_poison_pill` (
  `version` varchar(255) NOT NULL COMMENT 'Poison Pill version.'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sequence table for poison pill versions';

--
-- Dumping data for table `mg_queue_poison_pill`
--

INSERT INTO `mg_queue_poison_pill` VALUES ('version-69449a49c3ba0');

--
-- Table structure for table `mg_quote`
--

CREATE TABLE `mg_quote` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `converted_at` timestamp NULL DEFAULT NULL COMMENT 'Converted At',
  `is_active` smallint(5) unsigned DEFAULT '1' COMMENT 'Is Active',
  `is_virtual` smallint(5) unsigned DEFAULT '0' COMMENT 'Is Virtual',
  `is_multi_shipping` smallint(5) unsigned DEFAULT '0' COMMENT 'Is Multi Shipping',
  `items_count` int(10) unsigned DEFAULT '0' COMMENT 'Items Count',
  `items_qty` decimal(12,4) DEFAULT '0.0000' COMMENT 'Items Qty',
  `orig_order_id` int(10) unsigned DEFAULT '0' COMMENT 'Orig Order ID',
  `store_to_base_rate` decimal(12,4) DEFAULT '0.0000' COMMENT 'Store To Base Rate',
  `store_to_quote_rate` decimal(12,4) DEFAULT '0.0000' COMMENT 'Store To Quote Rate',
  `base_currency_code` varchar(255) DEFAULT NULL COMMENT 'Base Currency Code',
  `store_currency_code` varchar(255) DEFAULT NULL COMMENT 'Store Currency Code',
  `quote_currency_code` varchar(255) DEFAULT NULL COMMENT 'Quote Currency Code',
  `grand_total` decimal(20,4) DEFAULT '0.0000' COMMENT 'Grand Total',
  `base_grand_total` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Grand Total',
  `checkout_method` varchar(255) DEFAULT NULL COMMENT 'Checkout Method',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  `customer_tax_class_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Tax Class ID',
  `customer_group_id` int(10) unsigned DEFAULT '0' COMMENT 'Customer Group ID',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_prefix` varchar(40) DEFAULT NULL COMMENT 'Customer Prefix',
  `customer_firstname` varchar(255) DEFAULT NULL COMMENT 'Customer Firstname',
  `customer_middlename` varchar(40) DEFAULT NULL COMMENT 'Customer Middlename',
  `customer_lastname` varchar(255) DEFAULT NULL COMMENT 'Customer Lastname',
  `customer_suffix` varchar(40) DEFAULT NULL COMMENT 'Customer Suffix',
  `customer_dob` datetime DEFAULT NULL COMMENT 'Customer Dob',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint(5) unsigned DEFAULT '1' COMMENT 'Customer Note Notify',
  `customer_is_guest` smallint(5) unsigned DEFAULT '0' COMMENT 'Customer Is Guest',
  `remote_ip` varchar(45) DEFAULT NULL COMMENT 'Remote Ip',
  `applied_rule_ids` varchar(255) DEFAULT NULL COMMENT 'Applied Rule Ids',
  `reserved_order_id` varchar(64) DEFAULT NULL COMMENT 'Reserved Order ID',
  `password_hash` varchar(255) DEFAULT NULL COMMENT 'Password Hash',
  `coupon_code` varchar(255) DEFAULT NULL COMMENT 'Coupon Code',
  `global_currency_code` varchar(255) DEFAULT NULL COMMENT 'Global Currency Code',
  `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `base_to_quote_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Quote Rate',
  `customer_taxvat` varchar(255) DEFAULT NULL COMMENT 'Customer Taxvat',
  `customer_gender` varchar(255) DEFAULT NULL COMMENT 'Customer Gender',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `subtotal_with_discount` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal With Discount',
  `base_subtotal_with_discount` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal With Discount',
  `is_changed` int(10) unsigned DEFAULT NULL COMMENT 'Is Changed',
  `trigger_recollect` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Trigger Recollect',
  `ext_shipping_info` text COMMENT 'Ext Shipping Info',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',
  `is_persistent` smallint(5) unsigned DEFAULT '0' COMMENT 'Is Quote Persistent',
  PRIMARY KEY (`entity_id`),
  KEY `mg_QUOTE_CUSTOMER_ID_STORE_ID_IS_ACTIVE` (`customer_id`,`store_id`,`is_active`),
  KEY `mg_QUOTE_STORE_ID_UPDATED_AT` (`store_id`,`updated_at`),
  CONSTRAINT `mg_QUOTE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Quote';

--
-- Dumping data for table `mg_quote`
--

INSERT INTO `mg_quote` VALUES (1,1,'2025-12-09 15:51:16','2025-12-09 15:51:16',NULL,1,0,0,0,0.0000,0,0.0000,0.0000,'USD','USD','USD',0.0000,0.0000,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL,'USD',1.0000,1.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,1,0,NULL,NULL,0),(2,1,'2026-01-24 15:38:56','2026-01-24 15:38:56',NULL,1,0,0,0,0.0000,0,0.0000,0.0000,'USD','USD','USD',0.0000,0.0000,NULL,NULL,NULL,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,NULL,NULL,NULL,'USD',1.0000,1.0000,NULL,NULL,0.0000,0.0000,0.0000,0.0000,1,0,NULL,NULL,0);

--
-- Table structure for table `mg_quote_address`
--

CREATE TABLE `mg_quote_address` (
  `address_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Address ID',
  `quote_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  `save_in_address_book` smallint(6) DEFAULT '0' COMMENT 'Save In Address Book',
  `customer_address_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer Address ID',
  `address_type` varchar(10) DEFAULT NULL COMMENT 'Address Type',
  `email` varchar(255) DEFAULT NULL COMMENT 'Email',
  `prefix` varchar(40) DEFAULT NULL COMMENT 'Prefix',
  `firstname` varchar(255) DEFAULT NULL,
  `middlename` varchar(40) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `suffix` varchar(40) DEFAULT NULL COMMENT 'Suffix',
  `company` varchar(255) DEFAULT NULL COMMENT 'Company',
  `street` varchar(255) DEFAULT NULL COMMENT 'Street',
  `city` varchar(255) DEFAULT NULL,
  `region` varchar(255) DEFAULT NULL,
  `region_id` int(10) unsigned DEFAULT NULL COMMENT 'Region ID',
  `postcode` varchar(20) DEFAULT NULL COMMENT 'Postcode',
  `country_id` varchar(30) DEFAULT NULL COMMENT 'Country ID',
  `telephone` varchar(255) DEFAULT NULL,
  `fax` varchar(255) DEFAULT NULL,
  `same_as_billing` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Same As Billing',
  `collect_shipping_rates` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Collect Shipping Rates',
  `shipping_method` varchar(120) DEFAULT NULL,
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `weight` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Weight',
  `subtotal` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal',
  `base_subtotal` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Subtotal',
  `subtotal_with_discount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal With Discount',
  `base_subtotal_with_discount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Subtotal With Discount',
  `tax_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Tax Amount',
  `base_tax_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Tax Amount',
  `shipping_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Shipping Amount',
  `base_shipping_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Shipping Amount',
  `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `discount_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `base_discount_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Discount Amount',
  `grand_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Grand Total',
  `base_grand_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Grand Total',
  `customer_notes` text COMMENT 'Customer Notes',
  `applied_taxes` text COMMENT 'Applied Taxes',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Amount',
  `base_shipping_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Amount',
  `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `base_subtotal_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Total Incl Tax',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',
  `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `vat_id` text COMMENT 'Vat ID',
  `vat_is_valid` smallint(6) DEFAULT NULL COMMENT 'Vat Is Valid',
  `vat_request_id` text COMMENT 'Vat Request ID',
  `vat_request_date` text COMMENT 'Vat Request Date',
  `vat_request_success` smallint(6) DEFAULT NULL COMMENT 'Vat Request Success',
  `validated_country_code` text COMMENT 'Validated Country Code',
  `validated_vat_number` text COMMENT 'Validated Vat Number',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',
  `free_shipping` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Free Shipping',
  PRIMARY KEY (`address_id`),
  KEY `mg_QUOTE_ADDRESS_QUOTE_ID` (`quote_id`),
  CONSTRAINT `mg_QUOTE_ADDRESS_QUOTE_ID_mg_QUOTE_ENTITY_ID` FOREIGN KEY (`quote_id`) REFERENCES `mg_quote` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Quote Address';

--
-- Dumping data for table `mg_quote_address`
--

INSERT INTO `mg_quote_address` VALUES (1,1,'2025-12-09 15:51:16','2025-12-09 15:51:16',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,'null',NULL,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(2,1,'2025-12-09 15:51:16','2025-12-09 15:51:16',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,'null',NULL,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(3,2,'2026-01-24 15:38:56','2026-01-24 15:38:56',NULL,0,NULL,'billing',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,'null',NULL,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0),(4,2,'2026-01-24 15:38:56','2026-01-24 15:38:56',NULL,0,NULL,'shipping',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,NULL,NULL,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,'null',NULL,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,0.0000,NULL,0.0000,0.0000,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0);

--
-- Table structure for table `mg_quote_address_item`
--

CREATE TABLE `mg_quote_address_item` (
  `address_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Address Item ID',
  `parent_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Item ID',
  `quote_address_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote Address ID',
  `quote_item_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote Item ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `applied_rule_ids` text COMMENT 'Applied Rule Ids',
  `additional_data` text COMMENT 'Additional Data',
  `weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Weight',
  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty',
  `discount_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Discount Amount',
  `tax_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Tax Amount',
  `row_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Total',
  `base_row_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Total',
  `row_total_with_discount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Row Total With Discount',
  `base_discount_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Discount Amount',
  `base_tax_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Tax Amount',
  `row_weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Weight',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',
  `super_product_id` int(10) unsigned DEFAULT NULL COMMENT 'Super Product ID',
  `parent_product_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Product ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `image` varchar(255) DEFAULT NULL COMMENT 'Image',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `description` text COMMENT 'Description',
  `is_qty_decimal` int(10) unsigned DEFAULT NULL COMMENT 'Is Qty Decimal',
  `price` decimal(12,4) DEFAULT NULL COMMENT 'Price',
  `discount_percent` decimal(12,4) DEFAULT NULL COMMENT 'Discount Percent',
  `no_discount` int(10) unsigned DEFAULT NULL COMMENT 'No Discount',
  `tax_percent` decimal(12,4) DEFAULT NULL COMMENT 'Tax Percent',
  `base_price` decimal(20,4) DEFAULT NULL COMMENT 'Base Price',
  `base_cost` decimal(20,4) DEFAULT NULL COMMENT 'Base Cost',
  `price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `base_row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',
  `free_shipping` int(10) unsigned DEFAULT NULL COMMENT 'Free Shipping',
  PRIMARY KEY (`address_item_id`),
  KEY `mg_QUOTE_ADDRESS_ITEM_QUOTE_ADDRESS_ID` (`quote_address_id`),
  KEY `mg_QUOTE_ADDRESS_ITEM_PARENT_ITEM_ID` (`parent_item_id`),
  KEY `mg_QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID` (`quote_item_id`),
  KEY `mg_QUOTE_ADDRESS_ITEM_STORE_ID` (`store_id`),
  CONSTRAINT `FK_C8DC8D276B1E4E72CF56C0BA214DC849` FOREIGN KEY (`parent_item_id`) REFERENCES `mg_quote_address_item` (`address_item_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_QUOTE_ADDRESS_ITEM_QUOTE_ITEM_ID_mg_QUOTE_ITEM_ITEM_ID` FOREIGN KEY (`quote_item_id`) REFERENCES `mg_quote_item` (`item_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_QUOTE_ADDR_ITEM_QUOTE_ADDR_ID_mg_QUOTE_ADDR_ADDR_ID` FOREIGN KEY (`quote_address_id`) REFERENCES `mg_quote_address` (`address_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Quote Address Item';

--
-- Dumping data for table `mg_quote_address_item`
--


--
-- Table structure for table `mg_quote_id_mask`
--

CREATE TABLE `mg_quote_id_mask` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `quote_id` int(10) unsigned NOT NULL COMMENT 'Quote ID',
  `masked_id` varchar(32) DEFAULT NULL COMMENT 'Masked ID',
  PRIMARY KEY (`entity_id`,`quote_id`),
  KEY `mg_QUOTE_ID_MASK_QUOTE_ID` (`quote_id`),
  KEY `mg_QUOTE_ID_MASK_MASKED_ID` (`masked_id`),
  CONSTRAINT `mg_QUOTE_ID_MASK_QUOTE_ID_mg_QUOTE_ENTITY_ID` FOREIGN KEY (`quote_id`) REFERENCES `mg_quote` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='Quote ID and masked ID mapping';

--
-- Dumping data for table `mg_quote_id_mask`
--

INSERT INTO `mg_quote_id_mask` VALUES (2,2,'2QDaikLoeTcGnpQKhb0RnZO2ipQFxOUI'),(1,1,'c9nmSDFiQMvBpgbwMgMQfEKGjeUoDQg1');

--
-- Table structure for table `mg_quote_item`
--

CREATE TABLE `mg_quote_item` (
  `item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Item ID',
  `quote_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Quote ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `parent_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent Item ID',
  `is_virtual` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Virtual',
  `sku` varchar(255) DEFAULT NULL COMMENT 'Sku',
  `name` varchar(255) DEFAULT NULL COMMENT 'Name',
  `description` text COMMENT 'Description',
  `applied_rule_ids` text COMMENT 'Applied Rule Ids',
  `additional_data` text COMMENT 'Additional Data',
  `is_qty_decimal` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Qty Decimal',
  `no_discount` smallint(5) unsigned DEFAULT '0' COMMENT 'No Discount',
  `weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Weight',
  `qty` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty',
  `price` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Price',
  `base_price` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Price',
  `custom_price` decimal(20,4) DEFAULT NULL COMMENT 'Custom Price',
  `discount_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Discount Percent',
  `discount_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Discount Amount',
  `base_discount_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Discount Amount',
  `tax_percent` decimal(12,4) DEFAULT '0.0000' COMMENT 'Tax Percent',
  `tax_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Tax Amount',
  `base_tax_amount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Base Tax Amount',
  `row_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Row Total',
  `base_row_total` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Base Row Total',
  `row_total_with_discount` decimal(20,4) DEFAULT '0.0000' COMMENT 'Row Total With Discount',
  `row_weight` decimal(12,4) DEFAULT '0.0000' COMMENT 'Row Weight',
  `product_type` varchar(255) DEFAULT NULL COMMENT 'Product Type',
  `base_tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Before Discount',
  `tax_before_discount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Before Discount',
  `original_custom_price` decimal(20,4) DEFAULT NULL COMMENT 'Original Custom Price',
  `redirect_url` varchar(255) DEFAULT NULL COMMENT 'Redirect Url',
  `base_cost` decimal(12,4) DEFAULT NULL COMMENT 'Base Cost',
  `price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Price Incl Tax',
  `base_price_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Price Incl Tax',
  `row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Row Total Incl Tax',
  `base_row_total_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Row Total Incl Tax',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `gift_message_id` int(11) DEFAULT NULL COMMENT 'Gift Message ID',
  `free_shipping` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Free Shipping',
  `weee_tax_applied` text COMMENT 'Weee Tax Applied',
  `weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Amount',
  `weee_tax_applied_row_amount` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Applied Row Amount',
  `weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Disposition',
  `weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Weee Tax Row Disposition',
  `base_weee_tax_applied_amount` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Amount',
  `base_weee_tax_applied_row_amnt` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Applied Row Amnt',
  `base_weee_tax_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Disposition',
  `base_weee_tax_row_disposition` decimal(12,4) DEFAULT NULL COMMENT 'Base Weee Tax Row Disposition',
  PRIMARY KEY (`item_id`),
  KEY `mg_QUOTE_ITEM_PARENT_ITEM_ID` (`parent_item_id`),
  KEY `mg_QUOTE_ITEM_PRODUCT_ID` (`product_id`),
  KEY `mg_QUOTE_ITEM_QUOTE_ID` (`quote_id`),
  KEY `mg_QUOTE_ITEM_STORE_ID` (`store_id`),
  CONSTRAINT `mg_QUOTE_ITEM_PARENT_ITEM_ID_mg_QUOTE_ITEM_ITEM_ID` FOREIGN KEY (`parent_item_id`) REFERENCES `mg_quote_item` (`item_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_QUOTE_ITEM_QUOTE_ID_mg_QUOTE_ENTITY_ID` FOREIGN KEY (`quote_id`) REFERENCES `mg_quote` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_QUOTE_ITEM_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Quote Item';

--
-- Dumping data for table `mg_quote_item`
--


--
-- Table structure for table `mg_quote_item_option`
--

CREATE TABLE `mg_quote_item_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option ID',
  `item_id` int(10) unsigned NOT NULL COMMENT 'Item ID',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `value` text COMMENT 'Value',
  PRIMARY KEY (`option_id`),
  KEY `mg_QUOTE_ITEM_OPTION_ITEM_ID` (`item_id`),
  CONSTRAINT `mg_QUOTE_ITEM_OPTION_ITEM_ID_mg_QUOTE_ITEM_ITEM_ID` FOREIGN KEY (`item_id`) REFERENCES `mg_quote_item` (`item_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Quote Item Option';

--
-- Dumping data for table `mg_quote_item_option`
--


--
-- Table structure for table `mg_quote_payment`
--

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

--
-- Dumping data for table `mg_quote_payment`
--


--
-- Table structure for table `mg_quote_shipping_rate`
--

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

--
-- Dumping data for table `mg_quote_shipping_rate`
--


--
-- Table structure for table `mg_rating`
--

CREATE TABLE `mg_rating` (
  `rating_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rating ID',
  `entity_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `rating_code` varchar(64) NOT NULL COMMENT 'Rating Code',
  `position` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Position On Storefront',
  `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Rating is active.',
  PRIMARY KEY (`rating_id`),
  UNIQUE KEY `mg_RATING_RATING_CODE` (`rating_code`),
  KEY `mg_RATING_ENTITY_ID` (`entity_id`),
  CONSTRAINT `mg_RATING_ENTITY_ID_mg_RATING_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_rating_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='Ratings';

--
-- Dumping data for table `mg_rating`
--

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

--
-- Table structure for table `mg_rating_entity`
--

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

--
-- Dumping data for table `mg_rating_entity`
--

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

--
-- Table structure for table `mg_rating_option`
--

CREATE TABLE `mg_rating_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rating Option ID',
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `code` varchar(32) NOT NULL COMMENT 'Rating Option Code',
  `value` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Option Value',
  `position` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Ration option position on Storefront',
  PRIMARY KEY (`option_id`),
  KEY `mg_RATING_OPTION_RATING_ID` (`rating_id`),
  CONSTRAINT `mg_RATING_OPTION_RATING_ID_mg_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `mg_rating` (`rating_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COMMENT='Rating options';

--
-- Dumping data for table `mg_rating_option`
--

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

--
-- Table structure for table `mg_rating_option_vote`
--

CREATE TABLE `mg_rating_option_vote` (
  `vote_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Vote ID',
  `option_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Vote option ID',
  `remote_ip` varchar(16) NOT NULL COMMENT 'Customer IP',
  `remote_ip_long` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Customer IP converted to long integer format',
  `customer_id` int(10) unsigned DEFAULT '0' COMMENT 'Customer ID',
  `entity_pk_value` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `review_id` bigint(20) unsigned DEFAULT NULL COMMENT 'Review ID',
  `percent` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Percent amount',
  `value` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Vote option value',
  PRIMARY KEY (`vote_id`),
  KEY `mg_RATING_OPTION_VOTE_REVIEW_ID_mg_REVIEW_REVIEW_ID` (`review_id`),
  KEY `mg_RATING_OPTION_VOTE_OPTION_ID` (`option_id`),
  CONSTRAINT `mg_RATING_OPTION_VOTE_OPTION_ID_mg_RATING_OPTION_OPTION_ID` FOREIGN KEY (`option_id`) REFERENCES `mg_rating_option` (`option_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_RATING_OPTION_VOTE_REVIEW_ID_mg_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `mg_review` (`review_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Rating option values';

--
-- Dumping data for table `mg_rating_option_vote`
--


--
-- Table structure for table `mg_rating_option_vote_aggregated`
--

CREATE TABLE `mg_rating_option_vote_aggregated` (
  `primary_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Vote aggregation ID',
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `entity_pk_value` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `vote_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Vote dty',
  `vote_value_sum` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'General vote sum',
  `percent` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Vote percent',
  `percent_approved` smallint(6) DEFAULT '0' COMMENT 'Vote percent approved by admin',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  PRIMARY KEY (`primary_id`),
  KEY `mg_RATING_OPTION_VOTE_AGGREGATED_RATING_ID` (`rating_id`),
  KEY `mg_RATING_OPTION_VOTE_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `mg_RATING_OPTION_VOTE_AGGREGATED_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_RATING_OPT_VOTE_AGGRED_RATING_ID_mg_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `mg_rating` (`rating_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Rating vote aggregated';

--
-- Dumping data for table `mg_rating_option_vote_aggregated`
--


--
-- Table structure for table `mg_rating_store`
--

CREATE TABLE `mg_rating_store` (
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  PRIMARY KEY (`rating_id`,`store_id`),
  KEY `mg_RATING_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `mg_RATING_STORE_RATING_ID_mg_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `mg_rating` (`rating_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_RATING_STORE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Rating Store';

--
-- Dumping data for table `mg_rating_store`
--


--
-- Table structure for table `mg_rating_title`
--

CREATE TABLE `mg_rating_title` (
  `rating_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `value` varchar(255) NOT NULL COMMENT 'Rating Label',
  PRIMARY KEY (`rating_id`,`store_id`),
  KEY `mg_RATING_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `mg_RATING_TITLE_RATING_ID_mg_RATING_RATING_ID` FOREIGN KEY (`rating_id`) REFERENCES `mg_rating` (`rating_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_RATING_TITLE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Rating Title';

--
-- Dumping data for table `mg_rating_title`
--


--
-- Table structure for table `mg_release_notification_viewer_log`
--

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

--
-- Dumping data for table `mg_release_notification_viewer_log`
--


--
-- Table structure for table `mg_report_compared_product_index`
--

CREATE TABLE `mg_report_compared_product_index` (
  `index_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Index ID',
  `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',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `added_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `mg_REPORT_COMPARED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `mg_REPORT_COMPARED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `mg_REPORT_COMPARED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `mg_REPORT_COMPARED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `mg_REPORT_COMPARED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`),
  CONSTRAINT `mg_REPORT_CMPD_PRD_IDX_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REPORT_CMPD_PRD_IDX_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REPORT_COMPARED_PRODUCT_INDEX_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Reports Compared Product Index Table';

--
-- Dumping data for table `mg_report_compared_product_index`
--


--
-- Table structure for table `mg_report_event`
--

CREATE TABLE `mg_report_event` (
  `event_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Event ID',
  `logged_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Logged At',
  `event_type_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Event Type ID',
  `object_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Object ID',
  `subject_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Subject ID',
  `subtype` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Subtype',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`event_id`),
  KEY `mg_REPORT_EVENT_EVENT_TYPE_ID` (`event_type_id`),
  KEY `mg_REPORT_EVENT_SUBJECT_ID` (`subject_id`),
  KEY `mg_REPORT_EVENT_OBJECT_ID` (`object_id`),
  KEY `mg_REPORT_EVENT_SUBTYPE` (`subtype`),
  KEY `mg_REPORT_EVENT_STORE_ID` (`store_id`),
  CONSTRAINT `FK_1E9A364859CCE03F3DD9ACF825D18BF6` FOREIGN KEY (`event_type_id`) REFERENCES `mg_report_event_types` (`event_type_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REPORT_EVENT_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Reports Event Table';

--
-- Dumping data for table `mg_report_event`
--


--
-- Table structure for table `mg_report_event_types`
--

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

--
-- Dumping data for table `mg_report_event_types`
--

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

--
-- Table structure for table `mg_report_viewed_product_aggregated_daily`
--

CREATE TABLE `mg_report_viewed_product_aggregated_daily` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_REPORT_VIEWED_PRD_AGGRED_DAILY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `mg_REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_STORE_ID` (`store_id`),
  KEY `mg_REPORT_VIEWED_PRODUCT_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_E27C3B52E1A2D5E4845EB01EF11F49B2` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REPORT_VIEWED_PRD_AGGRED_DAILY_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Most Viewed Products Aggregated Daily';

--
-- Dumping data for table `mg_report_viewed_product_aggregated_daily`
--


--
-- Table structure for table `mg_report_viewed_product_aggregated_monthly`
--

CREATE TABLE `mg_report_viewed_product_aggregated_monthly` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_REPORT_VIEWED_PRD_AGGRED_MONTHLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `mg_REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),
  KEY `mg_REPORT_VIEWED_PRODUCT_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_B76260026D9FE9E45230A731A9860BA7` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_D5C3C380933099BF6DBA36FC13AA307B` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Most Viewed Products Aggregated Monthly';

--
-- Dumping data for table `mg_report_viewed_product_aggregated_monthly`
--


--
-- Table structure for table `mg_report_viewed_product_aggregated_yearly`
--

CREATE TABLE `mg_report_viewed_product_aggregated_yearly` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `views_num` int(11) NOT NULL DEFAULT '0' COMMENT 'Number of Views',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_REPORT_VIEWED_PRD_AGGRED_YEARLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `mg_REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_STORE_ID` (`store_id`),
  KEY `mg_REPORT_VIEWED_PRODUCT_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_6599AF5F11E05C842A7B226C6C7F3377` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_D9D14244DB9E38A4F72DE0072D998249` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Most Viewed Products Aggregated Yearly';

--
-- Dumping data for table `mg_report_viewed_product_aggregated_yearly`
--


--
-- Table structure for table `mg_report_viewed_product_index`
--

CREATE TABLE `mg_report_viewed_product_index` (
  `index_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Index ID',
  `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',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `added_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Added At',
  PRIMARY KEY (`index_id`),
  UNIQUE KEY `mg_REPORT_VIEWED_PRODUCT_INDEX_VISITOR_ID_PRODUCT_ID` (`visitor_id`,`product_id`),
  UNIQUE KEY `mg_REPORT_VIEWED_PRODUCT_INDEX_CUSTOMER_ID_PRODUCT_ID` (`customer_id`,`product_id`),
  KEY `mg_REPORT_VIEWED_PRODUCT_INDEX_STORE_ID` (`store_id`),
  KEY `mg_REPORT_VIEWED_PRODUCT_INDEX_ADDED_AT` (`added_at`),
  KEY `mg_REPORT_VIEWED_PRODUCT_INDEX_PRODUCT_ID` (`product_id`),
  CONSTRAINT `mg_REPORT_VIEWED_PRD_IDX_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REPORT_VIEWED_PRD_IDX_PRD_ID_mg_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REPORT_VIEWED_PRODUCT_INDEX_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Reports Viewed Product Index Table';

--
-- Dumping data for table `mg_report_viewed_product_index`
--


--
-- Table structure for table `mg_reporting_counts`
--

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

--
-- Dumping data for table `mg_reporting_counts`
--


--
-- Table structure for table `mg_reporting_module_status`
--

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

--
-- Dumping data for table `mg_reporting_module_status`
--


--
-- Table structure for table `mg_reporting_orders`
--

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

--
-- Dumping data for table `mg_reporting_orders`
--


--
-- Table structure for table `mg_reporting_system_updates`
--

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

--
-- Dumping data for table `mg_reporting_system_updates`
--


--
-- Table structure for table `mg_reporting_users`
--

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

--
-- Dumping data for table `mg_reporting_users`
--


--
-- Table structure for table `mg_review`
--

CREATE TABLE `mg_review` (
  `review_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Review create date',
  `entity_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `entity_pk_value` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `status_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Status code',
  PRIMARY KEY (`review_id`),
  KEY `mg_REVIEW_ENTITY_ID` (`entity_id`),
  KEY `mg_REVIEW_STATUS_ID` (`status_id`),
  KEY `mg_REVIEW_ENTITY_PK_VALUE` (`entity_pk_value`),
  CONSTRAINT `mg_REVIEW_ENTITY_ID_mg_REVIEW_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_review_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REVIEW_STATUS_ID_mg_REVIEW_STATUS_STATUS_ID` FOREIGN KEY (`status_id`) REFERENCES `mg_review_status` (`status_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Review base information';

--
-- Dumping data for table `mg_review`
--


--
-- Table structure for table `mg_review_detail`
--

CREATE TABLE `mg_review_detail` (
  `detail_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Review detail ID',
  `review_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Review ID',
  `store_id` smallint(5) unsigned DEFAULT '0' COMMENT 'Store ID',
  `title` varchar(255) NOT NULL COMMENT 'Title',
  `detail` text NOT NULL COMMENT 'Detail description',
  `nickname` varchar(128) NOT NULL COMMENT 'User nickname',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  PRIMARY KEY (`detail_id`),
  KEY `mg_REVIEW_DETAIL_REVIEW_ID` (`review_id`),
  KEY `mg_REVIEW_DETAIL_STORE_ID` (`store_id`),
  KEY `mg_REVIEW_DETAIL_CUSTOMER_ID` (`customer_id`),
  CONSTRAINT `mg_REVIEW_DETAIL_CUSTOMER_ID_mg_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE SET NULL,
  CONSTRAINT `mg_REVIEW_DETAIL_REVIEW_ID_mg_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `mg_review` (`review_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REVIEW_DETAIL_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Review detail information';

--
-- Dumping data for table `mg_review_detail`
--


--
-- Table structure for table `mg_review_entity`
--

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

--
-- Dumping data for table `mg_review_entity`
--

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

--
-- Table structure for table `mg_review_entity_summary`
--

CREATE TABLE `mg_review_entity_summary` (
  `primary_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'Summary review entity ID',
  `entity_pk_value` bigint(20) NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `entity_type` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Entity type ID',
  `reviews_count` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Qty of reviews',
  `rating_summary` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Summarized rating',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  PRIMARY KEY (`primary_id`),
  UNIQUE KEY `mg_REVIEW_ENTITY_SUMMARY_ENTITY_PK_VALUE_STORE_ID_ENTITY_TYPE` (`entity_pk_value`,`store_id`,`entity_type`),
  KEY `mg_REVIEW_ENTITY_SUMMARY_STORE_ID` (`store_id`),
  CONSTRAINT `mg_REVIEW_ENTITY_SUMMARY_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Review aggregates';

--
-- Dumping data for table `mg_review_entity_summary`
--


--
-- Table structure for table `mg_review_status`
--

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

--
-- Dumping data for table `mg_review_status`
--

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

--
-- Table structure for table `mg_review_store`
--

CREATE TABLE `mg_review_store` (
  `review_id` bigint(20) unsigned NOT NULL COMMENT 'Review ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  PRIMARY KEY (`review_id`,`store_id`),
  KEY `mg_REVIEW_STORE_STORE_ID` (`store_id`),
  CONSTRAINT `mg_REVIEW_STORE_REVIEW_ID_mg_REVIEW_REVIEW_ID` FOREIGN KEY (`review_id`) REFERENCES `mg_review` (`review_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_REVIEW_STORE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Review Store';

--
-- Dumping data for table `mg_review_store`
--


--
-- Table structure for table `mg_sales_bestsellers_aggregated_daily`
--

CREATE TABLE `mg_sales_bestsellers_aggregated_daily` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_SALES_BESTSELLERS_AGGRED_DAILY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `mg_SALES_BESTSELLERS_AGGREGATED_DAILY_STORE_ID` (`store_id`),
  KEY `mg_SALES_BESTSELLERS_AGGREGATED_DAILY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `mg_SALES_BESTSELLERS_AGGRED_DAILY_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Bestsellers Aggregated Daily';

--
-- Dumping data for table `mg_sales_bestsellers_aggregated_daily`
--


--
-- Table structure for table `mg_sales_bestsellers_aggregated_monthly`
--

CREATE TABLE `mg_sales_bestsellers_aggregated_monthly` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_SALES_BESTSELLERS_AGGRED_MONTHLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `mg_SALES_BESTSELLERS_AGGREGATED_MONTHLY_STORE_ID` (`store_id`),
  KEY `mg_SALES_BESTSELLERS_AGGREGATED_MONTHLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_917F1D21C8B65498447CACB6C2C45EC5` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Bestsellers Aggregated Monthly';

--
-- Dumping data for table `mg_sales_bestsellers_aggregated_monthly`
--


--
-- Table structure for table `mg_sales_bestsellers_aggregated_yearly`
--

CREATE TABLE `mg_sales_bestsellers_aggregated_yearly` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `product_id` int(10) unsigned DEFAULT NULL COMMENT 'Product ID',
  `product_name` varchar(255) DEFAULT NULL COMMENT 'Product Name',
  `product_price` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Product Price',
  `qty_ordered` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Qty Ordered',
  `rating_pos` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Rating Pos',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_SALES_BESTSELLERS_AGGRED_YEARLY_PERIOD_STORE_ID_PRD_ID` (`period`,`store_id`,`product_id`),
  KEY `mg_SALES_BESTSELLERS_AGGREGATED_YEARLY_STORE_ID` (`store_id`),
  KEY `mg_SALES_BESTSELLERS_AGGREGATED_YEARLY_PRODUCT_ID` (`product_id`),
  CONSTRAINT `FK_C2B58A114880F6D0AF2DE1C5DADF9AF1` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Bestsellers Aggregated Yearly';

--
-- Dumping data for table `mg_sales_bestsellers_aggregated_yearly`
--


--
-- Table structure for table `mg_sales_creditmemo`
--

CREATE TABLE `mg_sales_creditmemo` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',
  `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `store_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `base_adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Negative',
  `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
  `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',
  `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `store_to_base_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `base_adjustment` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment',
  `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `adjustment` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Base Adjustment Positive',
  `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  `email_sent` smallint(6) DEFAULT NULL COMMENT 'Email Sent',
  `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',
  `creditmemo_status` int(11) DEFAULT NULL COMMENT 'Creditmemo Status',
  `state` int(11) DEFAULT NULL COMMENT 'State',
  `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address ID',
  `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address ID',
  `invoice_id` int(11) DEFAULT NULL COMMENT 'Invoice ID',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `transaction_id` varchar(255) DEFAULT NULL COMMENT 'Transaction ID',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',
  `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_CREDITMEMO_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `mg_SALES_CREDITMEMO_STORE_ID` (`store_id`),
  KEY `mg_SALES_CREDITMEMO_ORDER_ID` (`order_id`),
  KEY `mg_SALES_CREDITMEMO_CREDITMEMO_STATUS` (`creditmemo_status`),
  KEY `mg_SALES_CREDITMEMO_STATE` (`state`),
  KEY `mg_SALES_CREDITMEMO_CREATED_AT` (`created_at`),
  KEY `mg_SALES_CREDITMEMO_UPDATED_AT` (`updated_at`),
  KEY `mg_SALES_CREDITMEMO_SEND_EMAIL` (`send_email`),
  KEY `mg_SALES_CREDITMEMO_EMAIL_SENT` (`email_sent`),
  CONSTRAINT `mg_SALES_CREDITMEMO_ORDER_ID_mg_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `mg_sales_order` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALES_CREDITMEMO_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Creditmemo';

--
-- Dumping data for table `mg_sales_creditmemo`
--


--
-- Table structure for table `mg_sales_creditmemo_comment`
--

CREATE TABLE `mg_sales_creditmemo_comment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',
  `is_customer_notified` int(11) DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Admin User ID',
  `user_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'User Type',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_CREDITMEMO_COMMENT_ENTITY_ID_USER_ID_USER_TYPE` (`entity_id`,`user_id`,`user_type`),
  KEY `mg_SALES_CREDITMEMO_COMMENT_CREATED_AT` (`created_at`),
  KEY `mg_SALES_CREDITMEMO_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_5387631F2834DD79690F101F14F382AF` FOREIGN KEY (`parent_id`) REFERENCES `mg_sales_creditmemo` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Creditmemo Comment';

--
-- Dumping data for table `mg_sales_creditmemo_comment`
--


--
-- Table structure for table `mg_sales_creditmemo_grid`
--

CREATE TABLE `mg_sales_creditmemo_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment ID',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `state` int(11) DEFAULT NULL COMMENT 'Status',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `order_status` varchar(32) DEFAULT NULL COMMENT 'Order Status',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `customer_name` varchar(128) NOT NULL COMMENT 'Customer Name',
  `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` smallint(6) DEFAULT NULL COMMENT 'Customer Group ID',
  `payment_method` varchar(32) DEFAULT NULL COMMENT 'Payment Method',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(20,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `adjustment_positive` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Positive',
  `adjustment_negative` decimal(20,4) DEFAULT NULL COMMENT 'Adjustment Negative',
  `order_base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Order Grand Total',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_CREDITMEMO_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `mg_SALES_CREDITMEMO_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `mg_SALES_CREDITMEMO_GRID_CREATED_AT` (`created_at`),
  KEY `mg_SALES_CREDITMEMO_GRID_UPDATED_AT` (`updated_at`),
  KEY `mg_SALES_CREDITMEMO_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `mg_SALES_CREDITMEMO_GRID_STATE` (`state`),
  KEY `mg_SALES_CREDITMEMO_GRID_BILLING_NAME` (`billing_name`),
  KEY `mg_SALES_CREDITMEMO_GRID_ORDER_STATUS` (`order_status`),
  KEY `mg_SALES_CREDITMEMO_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `mg_SALES_CREDITMEMO_GRID_STORE_ID` (`store_id`),
  KEY `mg_SALES_CREDITMEMO_GRID_ORDER_BASE_GRAND_TOTAL` (`order_base_grand_total`),
  KEY `mg_SALES_CREDITMEMO_GRID_ORDER_ID` (`order_id`),
  FULLTEXT KEY `FTI_9C333DEACC23DC368A7AFA455B8ED6D1` (`increment_id`,`order_increment_id`,`billing_name`,`billing_address`,`shipping_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Creditmemo Grid';

--
-- Dumping data for table `mg_sales_creditmemo_grid`
--


--
-- Table structure for table `mg_sales_creditmemo_item`
--

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

--
-- Dumping data for table `mg_sales_creditmemo_item`
--


--
-- Table structure for table `mg_sales_data_exporter_order_statuses`
--

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

--
-- Dumping data for table `mg_sales_data_exporter_order_statuses`
--


--
-- Table structure for table `mg_sales_data_exporter_order_statuses_index_batches`
--

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

--
-- Dumping data for table `mg_sales_data_exporter_order_statuses_index_batches`
--


--
-- Table structure for table `mg_sales_data_exporter_order_statuses_index_sequence`
--

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

--
-- Dumping data for table `mg_sales_data_exporter_order_statuses_index_sequence`
--


--
-- Table structure for table `mg_sales_data_exporter_orders`
--

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

--
-- Dumping data for table `mg_sales_data_exporter_orders`
--


--
-- Table structure for table `mg_sales_data_exporter_orders_index_batches`
--

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

--
-- Dumping data for table `mg_sales_data_exporter_orders_index_batches`
--


--
-- Table structure for table `mg_sales_data_exporter_orders_index_sequence`
--

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

--
-- Dumping data for table `mg_sales_data_exporter_orders_index_sequence`
--


--
-- Table structure for table `mg_sales_invoice`
--

CREATE TABLE `mg_sales_invoice` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Tax Amount',
  `tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Tax Amount',
  `base_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Tax Amount',
  `store_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Order Rate',
  `base_shipping_tax_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Tax Amount',
  `base_discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Amount',
  `base_to_order_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Order Rate',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Amount',
  `subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal Incl Tax',
  `base_subtotal_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal Incl Tax',
  `store_to_base_rate` decimal(20,4) DEFAULT NULL COMMENT 'Store To Base Rate',
  `base_shipping_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Amount',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `base_to_global_rate` decimal(20,4) DEFAULT NULL COMMENT 'Base To Global Rate',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `base_subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Base Subtotal',
  `discount_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Amount',
  `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address ID',
  `is_used_for_refund` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Used For Refund',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  `email_sent` smallint(6) DEFAULT NULL COMMENT 'Email Sent',
  `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',
  `can_void_flag` smallint(5) unsigned DEFAULT NULL COMMENT 'Can Void Flag',
  `state` int(11) DEFAULT NULL COMMENT 'State',
  `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address ID',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `transaction_id` varchar(255) DEFAULT NULL COMMENT 'Transaction ID',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Discount Tax Compensation Amount',
  `base_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Base Discount Tax Compensation Amount',
  `shipping_discount_tax_compensation_amount` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Discount Tax Compensation Amount',
  `base_shipping_discount_tax_compensation_amnt` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Discount Tax Compensation Amount',
  `shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Shipping Incl Tax',
  `base_shipping_incl_tax` decimal(20,4) DEFAULT NULL COMMENT 'Base Shipping Incl Tax',
  `base_total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Refunded',
  `discount_description` varchar(255) DEFAULT NULL COMMENT 'Discount Description',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_INVOICE_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `mg_SALES_INVOICE_STORE_ID` (`store_id`),
  KEY `mg_SALES_INVOICE_GRAND_TOTAL` (`grand_total`),
  KEY `mg_SALES_INVOICE_ORDER_ID` (`order_id`),
  KEY `mg_SALES_INVOICE_STATE` (`state`),
  KEY `mg_SALES_INVOICE_CREATED_AT` (`created_at`),
  KEY `mg_SALES_INVOICE_UPDATED_AT` (`updated_at`),
  KEY `mg_SALES_INVOICE_SEND_EMAIL` (`send_email`),
  KEY `mg_SALES_INVOICE_EMAIL_SENT` (`email_sent`),
  CONSTRAINT `mg_SALES_INVOICE_ORDER_ID_mg_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `mg_sales_order` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALES_INVOICE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Invoice';

--
-- Dumping data for table `mg_sales_invoice`
--


--
-- Table structure for table `mg_sales_invoice_comment`
--

CREATE TABLE `mg_sales_invoice_comment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',
  `is_customer_notified` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Admin User ID',
  `user_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'User Type',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_INVOICE_COMMENT_ENTITY_ID_USER_ID_USER_TYPE` (`entity_id`,`user_id`,`user_type`),
  KEY `mg_SALES_INVOICE_COMMENT_CREATED_AT` (`created_at`),
  KEY `mg_SALES_INVOICE_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `mg_SALES_INVOICE_COMMENT_PARENT_ID_mg_SALES_INVOICE_ENTT_ID` FOREIGN KEY (`parent_id`) REFERENCES `mg_sales_invoice` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Invoice Comment';

--
-- Dumping data for table `mg_sales_invoice_comment`
--


--
-- Table structure for table `mg_sales_invoice_grid`
--

CREATE TABLE `mg_sales_invoice_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `state` int(11) DEFAULT NULL COMMENT 'State',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  `order_increment_id` varchar(50) DEFAULT NULL COMMENT 'Order Increment ID',
  `order_created_at` timestamp NULL DEFAULT NULL COMMENT 'Order Created At',
  `customer_name` varchar(255) DEFAULT NULL COMMENT 'Customer Name',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` int(11) DEFAULT NULL,
  `payment_method` varchar(128) DEFAULT NULL COMMENT 'Payment Method',
  `store_currency_code` varchar(3) DEFAULT NULL COMMENT 'Store Currency Code',
  `order_currency_code` varchar(3) DEFAULT NULL COMMENT 'Order Currency Code',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `global_currency_code` varchar(3) DEFAULT NULL COMMENT 'Global Currency Code',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(20,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_INVOICE_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `mg_SALES_INVOICE_GRID_STORE_ID` (`store_id`),
  KEY `mg_SALES_INVOICE_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `mg_SALES_INVOICE_GRID_ORDER_ID` (`order_id`),
  KEY `mg_SALES_INVOICE_GRID_STATE` (`state`),
  KEY `mg_SALES_INVOICE_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `mg_SALES_INVOICE_GRID_CREATED_AT` (`created_at`),
  KEY `mg_SALES_INVOICE_GRID_UPDATED_AT` (`updated_at`),
  KEY `mg_SALES_INVOICE_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `mg_SALES_INVOICE_GRID_BILLING_NAME` (`billing_name`),
  KEY `mg_SALES_INVOICE_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  FULLTEXT KEY `FTI_A0EE7B3CDB178999DE2AC511FD6ACE5D` (`increment_id`,`order_increment_id`,`billing_name`,`billing_address`,`shipping_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Invoice Grid';

--
-- Dumping data for table `mg_sales_invoice_grid`
--


--
-- Table structure for table `mg_sales_invoice_item`
--

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

--
-- Dumping data for table `mg_sales_invoice_item`
--


--
-- Table structure for table `mg_sales_invoiced_aggregated`
--

CREATE TABLE `mg_sales_invoiced_aggregated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `orders_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Orders Invoiced',
  `invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced',
  `invoiced_captured` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced Captured',
  `invoiced_not_captured` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced Not Captured',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_SALES_INVOICED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `mg_SALES_INVOICED_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SALES_INVOICED_AGGREGATED_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Invoiced Aggregated';

--
-- Dumping data for table `mg_sales_invoiced_aggregated`
--


--
-- Table structure for table `mg_sales_invoiced_aggregated_order`
--

CREATE TABLE `mg_sales_invoiced_aggregated_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `orders_invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Orders Invoiced',
  `invoiced` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced',
  `invoiced_captured` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced Captured',
  `invoiced_not_captured` decimal(20,4) DEFAULT NULL COMMENT 'Invoiced Not Captured',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_SALES_INVOICED_AGGRED_ORDER_PERIOD_STORE_ID_ORDER_STS` (`period`,`store_id`,`order_status`),
  KEY `mg_SALES_INVOICED_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SALES_INVOICED_AGGRED_ORDER_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Invoiced Aggregated Order';

--
-- Dumping data for table `mg_sales_invoiced_aggregated_order`
--


--
-- Table structure for table `mg_sales_order`
--

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

--
-- Dumping data for table `mg_sales_order`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_order_after_insert` AFTER INSERT ON `mg_sales_order` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`entity_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_order_after_update` AFTER UPDATE ON `mg_sales_order` FOR EACH ROW BEGIN
IF (NOT(NEW.`entity_id` <=> OLD.`entity_id`) OR NOT(NEW.`state` <=> OLD.`state`) OR NOT(NEW.`status` <=> OLD.`status`) OR NOT(NEW.`coupon_code` <=> OLD.`coupon_code`) OR NOT(NEW.`protect_code` <=> OLD.`protect_code`) OR NOT(NEW.`shipping_description` <=> OLD.`shipping_description`) OR NOT(NEW.`is_virtual` <=> OLD.`is_virtual`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`customer_id` <=> OLD.`customer_id`) OR NOT(NEW.`base_discount_amount` <=> OLD.`base_discount_amount`) OR NOT(NEW.`base_discount_canceled` <=> OLD.`base_discount_canceled`) OR NOT(NEW.`base_discount_invoiced` <=> OLD.`base_discount_invoiced`) OR NOT(NEW.`base_discount_refunded` <=> OLD.`base_discount_refunded`) OR NOT(NEW.`base_grand_total` <=> OLD.`base_grand_total`) OR NOT(NEW.`base_shipping_amount` <=> OLD.`base_shipping_amount`) OR NOT(NEW.`base_shipping_canceled` <=> OLD.`base_shipping_canceled`) OR NOT(NEW.`base_shipping_invoiced` <=> OLD.`base_shipping_invoiced`) OR NOT(NEW.`base_shipping_refunded` <=> OLD.`base_shipping_refunded`) OR NOT(NEW.`base_shipping_tax_amount` <=> OLD.`base_shipping_tax_amount`) OR NOT(NEW.`base_shipping_tax_refunded` <=> OLD.`base_shipping_tax_refunded`) OR NOT(NEW.`base_subtotal` <=> OLD.`base_subtotal`) OR NOT(NEW.`base_subtotal_canceled` <=> OLD.`base_subtotal_canceled`) OR NOT(NEW.`base_subtotal_invoiced` <=> OLD.`base_subtotal_invoiced`) OR NOT(NEW.`base_subtotal_refunded` <=> OLD.`base_subtotal_refunded`) OR NOT(NEW.`base_tax_amount` <=> OLD.`base_tax_amount`) OR NOT(NEW.`base_tax_canceled` <=> OLD.`base_tax_canceled`) OR NOT(NEW.`base_tax_invoiced` <=> OLD.`base_tax_invoiced`) OR NOT(NEW.`base_tax_refunded` <=> OLD.`base_tax_refunded`) OR NOT(NEW.`base_to_global_rate` <=> OLD.`base_to_global_rate`) OR NOT(NEW.`base_to_order_rate` <=> OLD.`base_to_order_rate`) OR NOT(NEW.`base_total_canceled` <=> OLD.`base_total_canceled`) OR NOT(NEW.`base_total_invoiced` <=> OLD.`base_total_invoiced`) OR NOT(NEW.`base_total_invoiced_cost` <=> OLD.`base_total_invoiced_cost`) OR NOT(NEW.`base_total_offline_refunded` <=> OLD.`base_total_offline_refunded`) OR NOT(NEW.`base_total_online_refunded` <=> OLD.`base_total_online_refunded`) OR NOT(NEW.`base_total_paid` <=> OLD.`base_total_paid`) OR NOT(NEW.`base_total_qty_ordered` <=> OLD.`base_total_qty_ordered`) OR NOT(NEW.`base_total_refunded` <=> OLD.`base_total_refunded`) OR NOT(NEW.`discount_amount` <=> OLD.`discount_amount`) OR NOT(NEW.`discount_canceled` <=> OLD.`discount_canceled`) OR NOT(NEW.`discount_invoiced` <=> OLD.`discount_invoiced`) OR NOT(NEW.`discount_refunded` <=> OLD.`discount_refunded`) OR NOT(NEW.`grand_total` <=> OLD.`grand_total`) OR NOT(NEW.`shipping_amount` <=> OLD.`shipping_amount`) OR NOT(NEW.`shipping_canceled` <=> OLD.`shipping_canceled`) OR NOT(NEW.`shipping_invoiced` <=> OLD.`shipping_invoiced`) OR NOT(NEW.`shipping_refunded` <=> OLD.`shipping_refunded`) OR NOT(NEW.`shipping_tax_amount` <=> OLD.`shipping_tax_amount`) OR NOT(NEW.`shipping_tax_refunded` <=> OLD.`shipping_tax_refunded`) OR NOT(NEW.`store_to_base_rate` <=> OLD.`store_to_base_rate`) OR NOT(NEW.`store_to_order_rate` <=> OLD.`store_to_order_rate`) OR NOT(NEW.`subtotal` <=> OLD.`subtotal`) OR NOT(NEW.`subtotal_canceled` <=> OLD.`subtotal_canceled`) OR NOT(NEW.`subtotal_invoiced` <=> OLD.`subtotal_invoiced`) OR NOT(NEW.`subtotal_refunded` <=> OLD.`subtotal_refunded`) OR NOT(NEW.`tax_amount` <=> OLD.`tax_amount`) OR NOT(NEW.`tax_canceled` <=> OLD.`tax_canceled`) OR NOT(NEW.`tax_invoiced` <=> OLD.`tax_invoiced`) OR NOT(NEW.`tax_refunded` <=> OLD.`tax_refunded`) OR NOT(NEW.`total_canceled` <=> OLD.`total_canceled`) OR NOT(NEW.`total_invoiced` <=> OLD.`total_invoiced`) OR NOT(NEW.`total_offline_refunded` <=> OLD.`total_offline_refunded`) OR NOT(NEW.`total_online_refunded` <=> OLD.`total_online_refunded`) OR NOT(NEW.`total_paid` <=> OLD.`total_paid`) OR NOT(NEW.`total_qty_ordered` <=> OLD.`total_qty_ordered`) OR NOT(NEW.`total_refunded` <=> OLD.`total_refunded`) OR NOT(NEW.`can_ship_partially` <=> OLD.`can_ship_partially`) OR NOT(NEW.`can_ship_partially_item` <=> OLD.`can_ship_partially_item`) OR NOT(NEW.`customer_is_guest` <=> OLD.`customer_is_guest`) OR NOT(NEW.`customer_note_notify` <=> OLD.`customer_note_notify`) OR NOT(NEW.`billing_address_id` <=> OLD.`billing_address_id`) OR NOT(NEW.`customer_group_id` <=> OLD.`customer_group_id`) OR NOT(NEW.`edit_increment` <=> OLD.`edit_increment`) OR NOT(NEW.`email_sent` <=> OLD.`email_sent`) OR NOT(NEW.`send_email` <=> OLD.`send_email`) OR NOT(NEW.`forced_shipment_with_invoice` <=> OLD.`forced_shipment_with_invoice`) OR NOT(NEW.`payment_auth_expiration` <=> OLD.`payment_auth_expiration`) OR NOT(NEW.`quote_address_id` <=> OLD.`quote_address_id`) OR NOT(NEW.`quote_id` <=> OLD.`quote_id`) OR NOT(NEW.`shipping_address_id` <=> OLD.`shipping_address_id`) OR NOT(NEW.`adjustment_negative` <=> OLD.`adjustment_negative`) OR NOT(NEW.`adjustment_positive` <=> OLD.`adjustment_positive`) OR NOT(NEW.`base_adjustment_negative` <=> OLD.`base_adjustment_negative`) OR NOT(NEW.`base_adjustment_positive` <=> OLD.`base_adjustment_positive`) OR NOT(NEW.`base_shipping_discount_amount` <=> OLD.`base_shipping_discount_amount`) OR NOT(NEW.`base_subtotal_incl_tax` <=> OLD.`base_subtotal_incl_tax`) OR NOT(NEW.`base_total_due` <=> OLD.`base_total_due`) OR NOT(NEW.`payment_authorization_amount` <=> OLD.`payment_authorization_amount`) OR NOT(NEW.`shipping_discount_amount` <=> OLD.`shipping_discount_amount`) OR NOT(NEW.`subtotal_incl_tax` <=> OLD.`subtotal_incl_tax`) OR NOT(NEW.`total_due` <=> OLD.`total_due`) OR NOT(NEW.`weight` <=> OLD.`weight`) OR NOT(NEW.`customer_dob` <=> OLD.`customer_dob`) OR NOT(NEW.`increment_id` <=> OLD.`increment_id`) OR NOT(NEW.`applied_rule_ids` <=> OLD.`applied_rule_ids`) OR NOT(NEW.`base_currency_code` <=> OLD.`base_currency_code`) OR NOT(NEW.`customer_email` <=> OLD.`customer_email`) OR NOT(NEW.`customer_firstname` <=> OLD.`customer_firstname`) OR NOT(NEW.`customer_lastname` <=> OLD.`customer_lastname`) OR NOT(NEW.`customer_middlename` <=> OLD.`customer_middlename`) OR NOT(NEW.`customer_prefix` <=> OLD.`customer_prefix`) OR NOT(NEW.`customer_suffix` <=> OLD.`customer_suffix`) OR NOT(NEW.`customer_taxvat` <=> OLD.`customer_taxvat`) OR NOT(NEW.`discount_description` <=> OLD.`discount_description`) OR NOT(NEW.`ext_customer_id` <=> OLD.`ext_customer_id`) OR NOT(NEW.`ext_order_id` <=> OLD.`ext_order_id`) OR NOT(NEW.`global_currency_code` <=> OLD.`global_currency_code`) OR NOT(NEW.`hold_before_state` <=> OLD.`hold_before_state`) OR NOT(NEW.`hold_before_status` <=> OLD.`hold_before_status`) OR NOT(NEW.`order_currency_code` <=> OLD.`order_currency_code`) OR NOT(NEW.`original_increment_id` <=> OLD.`original_increment_id`) OR NOT(NEW.`relation_child_id` <=> OLD.`relation_child_id`) OR NOT(NEW.`relation_child_real_id` <=> OLD.`relation_child_real_id`) OR NOT(NEW.`relation_parent_id` <=> OLD.`relation_parent_id`) OR NOT(NEW.`relation_parent_real_id` <=> OLD.`relation_parent_real_id`) OR NOT(NEW.`remote_ip` <=> OLD.`remote_ip`) OR NOT(NEW.`shipping_method` <=> OLD.`shipping_method`) OR NOT(NEW.`store_currency_code` <=> OLD.`store_currency_code`) OR NOT(NEW.`store_name` <=> OLD.`store_name`) OR NOT(NEW.`x_forwarded_for` <=> OLD.`x_forwarded_for`) OR NOT(NEW.`customer_note` <=> OLD.`customer_note`) OR NOT(NEW.`created_at` <=> OLD.`created_at`) OR NOT(NEW.`total_item_count` <=> OLD.`total_item_count`) OR NOT(NEW.`customer_gender` <=> OLD.`customer_gender`) OR NOT(NEW.`discount_tax_compensation_amount` <=> OLD.`discount_tax_compensation_amount`) OR NOT(NEW.`base_discount_tax_compensation_amount` <=> OLD.`base_discount_tax_compensation_amount`) OR NOT(NEW.`shipping_discount_tax_compensation_amount` <=> OLD.`shipping_discount_tax_compensation_amount`) OR NOT(NEW.`base_shipping_discount_tax_compensation_amnt` <=> OLD.`base_shipping_discount_tax_compensation_amnt`) OR NOT(NEW.`discount_tax_compensation_invoiced` <=> OLD.`discount_tax_compensation_invoiced`) OR NOT(NEW.`base_discount_tax_compensation_invoiced` <=> OLD.`base_discount_tax_compensation_invoiced`) OR NOT(NEW.`discount_tax_compensation_refunded` <=> OLD.`discount_tax_compensation_refunded`) OR NOT(NEW.`base_discount_tax_compensation_refunded` <=> OLD.`base_discount_tax_compensation_refunded`) OR NOT(NEW.`shipping_incl_tax` <=> OLD.`shipping_incl_tax`) OR NOT(NEW.`base_shipping_incl_tax` <=> OLD.`base_shipping_incl_tax`) OR NOT(NEW.`coupon_rule_name` <=> OLD.`coupon_rule_name`) OR NOT(NEW.`gift_message_id` <=> OLD.`gift_message_id`) OR NOT(NEW.`paypal_ipn_customer_notified` <=> OLD.`paypal_ipn_customer_notified`) OR NOT(NEW.`dispute_status` <=> OLD.`dispute_status`)) THEN INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`entity_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_order_after_delete` AFTER DELETE ON `mg_sales_order` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (OLD.`entity_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_sales_order_address`
--

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

--
-- Dumping data for table `mg_sales_order_address`
--


--
-- Table structure for table `mg_sales_order_aggregated_created`
--

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

--
-- Dumping data for table `mg_sales_order_aggregated_created`
--


--
-- Table structure for table `mg_sales_order_aggregated_updated`
--

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

--
-- Dumping data for table `mg_sales_order_aggregated_updated`
--


--
-- Table structure for table `mg_sales_order_confirm_cancel`
--

CREATE TABLE `mg_sales_order_confirm_cancel` (
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  `confirmation_key` varchar(32) NOT NULL COMMENT 'Random key',
  `reason` varchar(255) NOT NULL COMMENT 'Cancellation reason',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'created at',
  PRIMARY KEY (`order_id`),
  CONSTRAINT `FK_03CCFA99C5B542E2E2B2E14012FA1F07` FOREIGN KEY (`order_id`) REFERENCES `mg_sales_order` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Save the confirmation key to cancel guest order';

--
-- Dumping data for table `mg_sales_order_confirm_cancel`
--


--
-- Table structure for table `mg_sales_order_data_exporter_cl`
--

CREATE TABLE `mg_sales_order_data_exporter_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 DEFAULT CHARSET=utf8mb4 COMMENT='mg_sales_order_data_exporter_cl';

--
-- Dumping data for table `mg_sales_order_data_exporter_cl`
--


--
-- Table structure for table `mg_sales_order_grid`
--

CREATE TABLE `mg_sales_order_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `status` varchar(32) DEFAULT NULL COMMENT 'Status',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `store_name` varchar(255) DEFAULT NULL COMMENT 'Store Name',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  `base_grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Base Grand Total',
  `base_total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Base Total Paid',
  `grand_total` decimal(20,4) DEFAULT NULL COMMENT 'Grand Total',
  `total_paid` decimal(20,4) DEFAULT NULL COMMENT 'Total Paid',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `base_currency_code` varchar(3) DEFAULT NULL COMMENT 'Base Currency Code',
  `order_currency_code` varchar(255) DEFAULT NULL COMMENT 'Order Currency Code',
  `shipping_name` varchar(255) DEFAULT NULL COMMENT 'Shipping Name',
  `billing_name` varchar(255) DEFAULT NULL COMMENT 'Billing Name',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `customer_email` varchar(255) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group` varchar(255) DEFAULT NULL COMMENT 'Customer Group',
  `subtotal` decimal(20,4) DEFAULT NULL COMMENT 'Subtotal',
  `shipping_and_handling` decimal(20,4) DEFAULT NULL COMMENT 'Shipping and handling amount',
  `customer_name` varchar(255) DEFAULT NULL COMMENT 'Customer Name',
  `payment_method` varchar(255) DEFAULT NULL COMMENT 'Payment Method',
  `total_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Total Refunded',
  `pickup_location_code` varchar(255) DEFAULT NULL COMMENT 'Pickup Location Code',
  `dispute_status` varchar(45) DEFAULT NULL COMMENT 'Braintree Dispute Status',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_ORDER_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `mg_SALES_ORDER_GRID_STATUS` (`status`),
  KEY `mg_SALES_ORDER_GRID_STORE_ID` (`store_id`),
  KEY `mg_SALES_ORDER_GRID_BASE_GRAND_TOTAL` (`base_grand_total`),
  KEY `mg_SALES_ORDER_GRID_BASE_TOTAL_PAID` (`base_total_paid`),
  KEY `mg_SALES_ORDER_GRID_GRAND_TOTAL` (`grand_total`),
  KEY `mg_SALES_ORDER_GRID_TOTAL_PAID` (`total_paid`),
  KEY `mg_SALES_ORDER_GRID_SHIPPING_NAME` (`shipping_name`),
  KEY `mg_SALES_ORDER_GRID_BILLING_NAME` (`billing_name`),
  KEY `mg_SALES_ORDER_GRID_CREATED_AT` (`created_at`),
  KEY `mg_SALES_ORDER_GRID_CUSTOMER_ID` (`customer_id`),
  KEY `mg_SALES_ORDER_GRID_UPDATED_AT` (`updated_at`),
  KEY `mg_SALES_ORDER_GRID_PICKUP_LOCATION_CODE` (`pickup_location_code`),
  FULLTEXT KEY `FTI_B1EE20E09A9B65FBC10BE8CC9A273F85` (`increment_id`,`billing_name`,`shipping_name`,`shipping_address`,`billing_address`,`customer_name`,`customer_email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Order Grid';

--
-- Dumping data for table `mg_sales_order_grid`
--


--
-- Table structure for table `mg_sales_order_item`
--

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

--
-- Dumping data for table `mg_sales_order_item`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_order_item_after_insert` AFTER INSERT ON `mg_sales_order_item` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`order_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_order_item_after_update` AFTER UPDATE ON `mg_sales_order_item` FOR EACH ROW BEGIN
IF (NOT(NEW.`item_id` <=> OLD.`item_id`) OR NOT(NEW.`order_id` <=> OLD.`order_id`) OR NOT(NEW.`parent_item_id` <=> OLD.`parent_item_id`) OR NOT(NEW.`quote_item_id` <=> OLD.`quote_item_id`) OR NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`created_at` <=> OLD.`created_at`) OR NOT(NEW.`product_id` <=> OLD.`product_id`) OR NOT(NEW.`product_type` <=> OLD.`product_type`) OR NOT(NEW.`product_options` <=> OLD.`product_options`) OR NOT(NEW.`weight` <=> OLD.`weight`) OR NOT(NEW.`is_virtual` <=> OLD.`is_virtual`) OR NOT(NEW.`sku` <=> OLD.`sku`) OR NOT(NEW.`name` <=> OLD.`name`) OR NOT(NEW.`description` <=> OLD.`description`) OR NOT(NEW.`applied_rule_ids` <=> OLD.`applied_rule_ids`) OR NOT(NEW.`additional_data` <=> OLD.`additional_data`) OR NOT(NEW.`is_qty_decimal` <=> OLD.`is_qty_decimal`) OR NOT(NEW.`no_discount` <=> OLD.`no_discount`) OR NOT(NEW.`qty_backordered` <=> OLD.`qty_backordered`) OR NOT(NEW.`qty_canceled` <=> OLD.`qty_canceled`) OR NOT(NEW.`qty_invoiced` <=> OLD.`qty_invoiced`) OR NOT(NEW.`qty_ordered` <=> OLD.`qty_ordered`) OR NOT(NEW.`qty_refunded` <=> OLD.`qty_refunded`) OR NOT(NEW.`qty_shipped` <=> OLD.`qty_shipped`) OR NOT(NEW.`base_cost` <=> OLD.`base_cost`) OR NOT(NEW.`price` <=> OLD.`price`) OR NOT(NEW.`base_price` <=> OLD.`base_price`) OR NOT(NEW.`original_price` <=> OLD.`original_price`) OR NOT(NEW.`base_original_price` <=> OLD.`base_original_price`) OR NOT(NEW.`tax_percent` <=> OLD.`tax_percent`) OR NOT(NEW.`tax_amount` <=> OLD.`tax_amount`) OR NOT(NEW.`base_tax_amount` <=> OLD.`base_tax_amount`) OR NOT(NEW.`tax_invoiced` <=> OLD.`tax_invoiced`) OR NOT(NEW.`base_tax_invoiced` <=> OLD.`base_tax_invoiced`) OR NOT(NEW.`discount_percent` <=> OLD.`discount_percent`) OR NOT(NEW.`discount_amount` <=> OLD.`discount_amount`) OR NOT(NEW.`base_discount_amount` <=> OLD.`base_discount_amount`) OR NOT(NEW.`discount_invoiced` <=> OLD.`discount_invoiced`) OR NOT(NEW.`base_discount_invoiced` <=> OLD.`base_discount_invoiced`) OR NOT(NEW.`amount_refunded` <=> OLD.`amount_refunded`) OR NOT(NEW.`base_amount_refunded` <=> OLD.`base_amount_refunded`) OR NOT(NEW.`row_total` <=> OLD.`row_total`) OR NOT(NEW.`base_row_total` <=> OLD.`base_row_total`) OR NOT(NEW.`row_invoiced` <=> OLD.`row_invoiced`) OR NOT(NEW.`base_row_invoiced` <=> OLD.`base_row_invoiced`) OR NOT(NEW.`row_weight` <=> OLD.`row_weight`) OR NOT(NEW.`base_tax_before_discount` <=> OLD.`base_tax_before_discount`) OR NOT(NEW.`tax_before_discount` <=> OLD.`tax_before_discount`) OR NOT(NEW.`ext_order_item_id` <=> OLD.`ext_order_item_id`) OR NOT(NEW.`locked_do_invoice` <=> OLD.`locked_do_invoice`) OR NOT(NEW.`locked_do_ship` <=> OLD.`locked_do_ship`) OR NOT(NEW.`price_incl_tax` <=> OLD.`price_incl_tax`) OR NOT(NEW.`base_price_incl_tax` <=> OLD.`base_price_incl_tax`) OR NOT(NEW.`row_total_incl_tax` <=> OLD.`row_total_incl_tax`) OR NOT(NEW.`base_row_total_incl_tax` <=> OLD.`base_row_total_incl_tax`) OR NOT(NEW.`discount_tax_compensation_amount` <=> OLD.`discount_tax_compensation_amount`) OR NOT(NEW.`base_discount_tax_compensation_amount` <=> OLD.`base_discount_tax_compensation_amount`) OR NOT(NEW.`discount_tax_compensation_invoiced` <=> OLD.`discount_tax_compensation_invoiced`) OR NOT(NEW.`base_discount_tax_compensation_invoiced` <=> OLD.`base_discount_tax_compensation_invoiced`) OR NOT(NEW.`discount_tax_compensation_refunded` <=> OLD.`discount_tax_compensation_refunded`) OR NOT(NEW.`base_discount_tax_compensation_refunded` <=> OLD.`base_discount_tax_compensation_refunded`) OR NOT(NEW.`tax_canceled` <=> OLD.`tax_canceled`) OR NOT(NEW.`discount_tax_compensation_canceled` <=> OLD.`discount_tax_compensation_canceled`) OR NOT(NEW.`tax_refunded` <=> OLD.`tax_refunded`) OR NOT(NEW.`base_tax_refunded` <=> OLD.`base_tax_refunded`) OR NOT(NEW.`discount_refunded` <=> OLD.`discount_refunded`) OR NOT(NEW.`base_discount_refunded` <=> OLD.`base_discount_refunded`) OR NOT(NEW.`gift_message_id` <=> OLD.`gift_message_id`) OR NOT(NEW.`gift_message_available` <=> OLD.`gift_message_available`) OR NOT(NEW.`free_shipping` <=> OLD.`free_shipping`) OR NOT(NEW.`weee_tax_applied` <=> OLD.`weee_tax_applied`) OR NOT(NEW.`weee_tax_applied_amount` <=> OLD.`weee_tax_applied_amount`) OR NOT(NEW.`weee_tax_applied_row_amount` <=> OLD.`weee_tax_applied_row_amount`) OR NOT(NEW.`weee_tax_disposition` <=> OLD.`weee_tax_disposition`) OR NOT(NEW.`weee_tax_row_disposition` <=> OLD.`weee_tax_row_disposition`) OR NOT(NEW.`base_weee_tax_applied_amount` <=> OLD.`base_weee_tax_applied_amount`) OR NOT(NEW.`base_weee_tax_applied_row_amnt` <=> OLD.`base_weee_tax_applied_row_amnt`) OR NOT(NEW.`base_weee_tax_disposition` <=> OLD.`base_weee_tax_disposition`) OR NOT(NEW.`base_weee_tax_row_disposition` <=> OLD.`base_weee_tax_row_disposition`)) THEN INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`order_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_order_item_after_delete` AFTER DELETE ON `mg_sales_order_item` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (OLD.`order_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_sales_order_payment`
--

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

--
-- Dumping data for table `mg_sales_order_payment`
--


--
-- Table structure for table `mg_sales_order_status`
--

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

--
-- Dumping data for table `mg_sales_order_status`
--

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

--
-- Table structure for table `mg_sales_order_status_change_history`
--

CREATE TABLE `mg_sales_order_status_change_history` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  `status` varchar(32) NOT NULL COMMENT 'Order Status',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Order status updated at',
  PRIMARY KEY (`entity_id`),
  KEY `FK_DA8CBD7803251060EDE247D400FBBD93` (`order_id`),
  CONSTRAINT `FK_DA8CBD7803251060EDE247D400FBBD93` FOREIGN KEY (`order_id`) REFERENCES `mg_sales_order` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Save the updated order status with timestamp';

--
-- Dumping data for table `mg_sales_order_status_change_history`
--


--
-- Table structure for table `mg_sales_order_status_data_exporter_cl`
--

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

--
-- Dumping data for table `mg_sales_order_status_data_exporter_cl`
--

INSERT INTO `mg_sales_order_status_data_exporter_cl` VALUES (1,'pending'),(2,'pending_payment'),(3,'processing'),(4,'holded'),(5,'complete'),(6,'closed'),(7,'canceled'),(8,'fraud'),(9,'payment_review'),(10,'pending_paypal'),(11,'paypal_reversed'),(12,'paypal_canceled_reversal');

--
-- Table structure for table `mg_sales_order_status_history`
--

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

--
-- Dumping data for table `mg_sales_order_status_history`
--


--
-- Table structure for table `mg_sales_order_status_label`
--

CREATE TABLE `mg_sales_order_status_label` (
  `status` varchar(32) NOT NULL COMMENT 'Status',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `label` varchar(128) NOT NULL COMMENT 'Label',
  PRIMARY KEY (`status`,`store_id`),
  KEY `mg_SALES_ORDER_STATUS_LABEL_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SALES_ORDER_STATUS_LABEL_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALES_ORDER_STS_LBL_STS_mg_SALES_ORDER_STS_STS` FOREIGN KEY (`status`) REFERENCES `mg_sales_order_status` (`status`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Order Status Label Table';

--
-- Dumping data for table `mg_sales_order_status_label`
--


--
-- Table structure for table `mg_sales_order_status_state`
--

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

--
-- Dumping data for table `mg_sales_order_status_state`
--

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

--
-- Table structure for table `mg_sales_order_tax`
--

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

--
-- Dumping data for table `mg_sales_order_tax`
--


--
-- Table structure for table `mg_sales_order_tax_item`
--

CREATE TABLE `mg_sales_order_tax_item` (
  `tax_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Tax Item ID',
  `tax_id` int(10) unsigned NOT NULL COMMENT 'Tax ID',
  `item_id` int(10) unsigned DEFAULT NULL COMMENT 'Item ID',
  `tax_percent` decimal(12,4) NOT NULL COMMENT 'Real Tax Percent For Item',
  `amount` decimal(20,4) NOT NULL COMMENT 'Tax amount for the item and tax rate',
  `base_amount` decimal(20,4) NOT NULL COMMENT 'Base tax amount for the item and tax rate',
  `real_amount` decimal(20,4) NOT NULL COMMENT 'Real tax amount for the item and tax rate',
  `real_base_amount` decimal(20,4) NOT NULL COMMENT 'Real base tax amount for the item and tax rate',
  `associated_item_id` int(10) unsigned DEFAULT NULL COMMENT 'Id of the associated item',
  `taxable_item_type` varchar(32) NOT NULL COMMENT 'Type of the taxable item',
  PRIMARY KEY (`tax_item_id`),
  UNIQUE KEY `mg_SALES_ORDER_TAX_ITEM_TAX_ID_ITEM_ID` (`tax_id`,`item_id`),
  KEY `FK_C5158D2E6E4CE4AE5A4588108F277924` (`associated_item_id`),
  KEY `mg_SALES_ORDER_TAX_ITEM_ITEM_ID` (`item_id`),
  CONSTRAINT `FK_C5158D2E6E4CE4AE5A4588108F277924` FOREIGN KEY (`associated_item_id`) REFERENCES `mg_sales_order_item` (`item_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALES_ORDER_TAX_ITEM_ITEM_ID_mg_SALES_ORDER_ITEM_ITEM_ID` FOREIGN KEY (`item_id`) REFERENCES `mg_sales_order_item` (`item_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALES_ORDER_TAX_ITEM_TAX_ID_mg_SALES_ORDER_TAX_TAX_ID` FOREIGN KEY (`tax_id`) REFERENCES `mg_sales_order_tax` (`tax_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Order Tax Item';

--
-- Dumping data for table `mg_sales_order_tax_item`
--


--
-- Table structure for table `mg_sales_payment_transaction`
--

CREATE TABLE `mg_sales_payment_transaction` (
  `transaction_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Transaction ID',
  `parent_id` int(10) unsigned DEFAULT NULL COMMENT 'Parent ID',
  `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Order ID',
  `payment_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Payment ID',
  `txn_id` varchar(100) DEFAULT NULL COMMENT 'Txn ID',
  `parent_txn_id` varchar(100) DEFAULT NULL COMMENT 'Parent Txn ID',
  `txn_type` varchar(15) DEFAULT NULL COMMENT 'Txn Type',
  `is_closed` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Closed',
  `additional_information` blob COMMENT 'Additional Information',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  PRIMARY KEY (`transaction_id`),
  UNIQUE KEY `mg_SALES_PAYMENT_TRANSACTION_ORDER_ID_PAYMENT_ID_TXN_ID` (`order_id`,`payment_id`,`txn_id`),
  KEY `mg_SALES_PAYMENT_TRANSACTION_PARENT_ID` (`parent_id`),
  KEY `mg_SALES_PAYMENT_TRANSACTION_PAYMENT_ID` (`payment_id`),
  CONSTRAINT `FK_73B7F4264FB521058F4E709F99A54F3A` FOREIGN KEY (`parent_id`) REFERENCES `mg_sales_payment_transaction` (`transaction_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_A76BCDC6CC14CF321955BB90C26EF2B1` FOREIGN KEY (`payment_id`) REFERENCES `mg_sales_order_payment` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALES_PAYMENT_TRANSACTION_ORDER_ID_mg_SALES_ORDER_ENTT_ID` FOREIGN KEY (`order_id`) REFERENCES `mg_sales_order` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Payment Transaction';

--
-- Dumping data for table `mg_sales_payment_transaction`
--

DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_payment_transaction_after_insert` AFTER INSERT ON `mg_sales_payment_transaction` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`order_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_payment_transaction_after_update` AFTER UPDATE ON `mg_sales_payment_transaction` FOR EACH ROW BEGIN
IF (NOT(NEW.`transaction_id` <=> OLD.`transaction_id`) OR NOT(NEW.`parent_id` <=> OLD.`parent_id`) OR NOT(NEW.`order_id` <=> OLD.`order_id`) OR NOT(NEW.`payment_id` <=> OLD.`payment_id`) OR NOT(NEW.`txn_id` <=> OLD.`txn_id`) OR NOT(NEW.`parent_txn_id` <=> OLD.`parent_txn_id`) OR NOT(NEW.`txn_type` <=> OLD.`txn_type`) OR NOT(NEW.`is_closed` <=> OLD.`is_closed`) OR NOT(NEW.`additional_information` <=> OLD.`additional_information`) OR NOT(NEW.`created_at` <=> OLD.`created_at`)) THEN INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (NEW.`order_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_sales_payment_transaction_after_delete` AFTER DELETE ON `mg_sales_payment_transaction` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_sales_order_data_exporter_cl` (`entity_id`) VALUES (OLD.`order_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_sales_refunded_aggregated`
--

CREATE TABLE `mg_sales_refunded_aggregated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `refunded` decimal(20,4) DEFAULT NULL COMMENT 'Refunded',
  `online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Online Refunded',
  `offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Offline Refunded',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_SALES_REFUNDED_AGGREGATED_PERIOD_STORE_ID_ORDER_STATUS` (`period`,`store_id`,`order_status`),
  KEY `mg_SALES_REFUNDED_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SALES_REFUNDED_AGGREGATED_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Refunded Aggregated';

--
-- Dumping data for table `mg_sales_refunded_aggregated`
--


--
-- Table structure for table `mg_sales_refunded_aggregated_order`
--

CREATE TABLE `mg_sales_refunded_aggregated_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `refunded` decimal(20,4) DEFAULT NULL COMMENT 'Refunded',
  `online_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Online Refunded',
  `offline_refunded` decimal(20,4) DEFAULT NULL COMMENT 'Offline Refunded',
  PRIMARY KEY (`id`),
  UNIQUE KEY `mg_SALES_REFUNDED_AGGRED_ORDER_PERIOD_STORE_ID_ORDER_STS` (`period`,`store_id`,`order_status`),
  KEY `mg_SALES_REFUNDED_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SALES_REFUNDED_AGGRED_ORDER_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Refunded Aggregated Order';

--
-- Dumping data for table `mg_sales_refunded_aggregated_order`
--


--
-- Table structure for table `mg_sales_sequence_meta`
--

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

--
-- Dumping data for table `mg_sales_sequence_meta`
--

INSERT INTO `mg_sales_sequence_meta` VALUES (1,'order',0,'mg_sequence_order_0'),(2,'invoice',0,'mg_sequence_invoice_0'),(3,'creditmemo',0,'mg_sequence_creditmemo_0'),(4,'shipment',0,'mg_sequence_shipment_0'),(5,'order',1,'mg_sequence_order_1'),(6,'invoice',1,'mg_sequence_invoice_1'),(7,'creditmemo',1,'mg_sequence_creditmemo_1'),(8,'shipment',1,'mg_sequence_shipment_1');

--
-- Table structure for table `mg_sales_sequence_profile`
--

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

--
-- Dumping data for table `mg_sales_sequence_profile`
--

INSERT INTO `mg_sales_sequence_profile` VALUES (1,1,NULL,NULL,1,1,4294967295,4294966295,1),(2,2,NULL,NULL,1,1,4294967295,4294966295,1),(3,3,NULL,NULL,1,1,4294967295,4294966295,1),(4,4,NULL,NULL,1,1,4294967295,4294966295,1),(5,5,NULL,NULL,1,1,4294967295,4294966295,1),(6,6,NULL,NULL,1,1,4294967295,4294966295,1),(7,7,NULL,NULL,1,1,4294967295,4294966295,1),(8,8,NULL,NULL,1,1,4294967295,4294966295,1);

--
-- Table structure for table `mg_sales_shipment`
--

CREATE TABLE `mg_sales_shipment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `total_weight` decimal(12,4) DEFAULT NULL COMMENT 'Total Weight',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `email_sent` smallint(6) DEFAULT NULL COMMENT 'Email Sent',
  `send_email` smallint(5) unsigned DEFAULT NULL COMMENT 'Send Email',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  `customer_id` int(11) DEFAULT NULL COMMENT 'Customer ID',
  `shipping_address_id` int(11) DEFAULT NULL COMMENT 'Shipping Address ID',
  `billing_address_id` int(11) DEFAULT NULL COMMENT 'Billing Address ID',
  `shipment_status` int(11) DEFAULT NULL COMMENT 'Shipment Status',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `packages` text COMMENT 'Packed Products in Packages',
  `shipping_label` mediumblob COMMENT 'Shipping Label Content',
  `customer_note` text COMMENT 'Customer Note',
  `customer_note_notify` smallint(5) unsigned DEFAULT NULL COMMENT 'Customer Note Notify',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_SHIPMENT_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `mg_SALES_SHIPMENT_STORE_ID` (`store_id`),
  KEY `mg_SALES_SHIPMENT_TOTAL_QTY` (`total_qty`),
  KEY `mg_SALES_SHIPMENT_ORDER_ID` (`order_id`),
  KEY `mg_SALES_SHIPMENT_CREATED_AT` (`created_at`),
  KEY `mg_SALES_SHIPMENT_UPDATED_AT` (`updated_at`),
  KEY `mg_SALES_SHIPMENT_SEND_EMAIL` (`send_email`),
  KEY `mg_SALES_SHIPMENT_EMAIL_SENT` (`email_sent`),
  CONSTRAINT `mg_SALES_SHIPMENT_ORDER_ID_mg_SALES_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES `mg_sales_order` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALES_SHIPMENT_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Shipment';

--
-- Dumping data for table `mg_sales_shipment`
--


--
-- Table structure for table `mg_sales_shipment_comment`
--

CREATE TABLE `mg_sales_shipment_comment` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `parent_id` int(10) unsigned NOT NULL COMMENT 'Parent ID',
  `is_customer_notified` int(11) DEFAULT NULL COMMENT 'Is Customer Notified',
  `is_visible_on_front` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is Visible On Front',
  `comment` text COMMENT 'Comment',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated At',
  `user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Admin User ID',
  `user_type` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'User Type',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_SHIPMENT_COMMENT_ENTITY_ID_USER_ID_USER_TYPE` (`entity_id`,`user_id`,`user_type`),
  KEY `mg_SALES_SHIPMENT_COMMENT_CREATED_AT` (`created_at`),
  KEY `mg_SALES_SHIPMENT_COMMENT_PARENT_ID` (`parent_id`),
  CONSTRAINT `FK_189F8F82DC76F0FCED78AFF20039A3A2` FOREIGN KEY (`parent_id`) REFERENCES `mg_sales_shipment` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Shipment Comment';

--
-- Dumping data for table `mg_sales_shipment_comment`
--


--
-- Table structure for table `mg_sales_shipment_grid`
--

CREATE TABLE `mg_sales_shipment_grid` (
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `increment_id` varchar(50) DEFAULT NULL COMMENT 'Increment ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_increment_id` varchar(32) NOT NULL COMMENT 'Order Increment ID',
  `order_id` int(10) unsigned NOT NULL COMMENT 'Order ID',
  `order_created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Order Increment ID',
  `customer_name` varchar(128) NOT NULL COMMENT 'Customer Name',
  `total_qty` decimal(12,4) DEFAULT NULL COMMENT 'Total Qty',
  `shipment_status` int(11) DEFAULT NULL COMMENT 'Shipment Status',
  `order_status` varchar(32) DEFAULT NULL COMMENT 'Order',
  `billing_address` varchar(255) DEFAULT NULL COMMENT 'Billing Address',
  `shipping_address` varchar(255) DEFAULT NULL COMMENT 'Shipping Address',
  `billing_name` varchar(128) DEFAULT NULL COMMENT 'Billing Name',
  `shipping_name` varchar(128) DEFAULT NULL COMMENT 'Shipping Name',
  `customer_email` varchar(128) DEFAULT NULL COMMENT 'Customer Email',
  `customer_group_id` int(11) DEFAULT NULL,
  `payment_method` varchar(32) DEFAULT NULL COMMENT 'Payment Method',
  `shipping_information` varchar(255) DEFAULT NULL COMMENT 'Shipping Method Name',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Created At',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Updated At',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_SALES_SHIPMENT_GRID_INCREMENT_ID_STORE_ID` (`increment_id`,`store_id`),
  KEY `mg_SALES_SHIPMENT_GRID_STORE_ID` (`store_id`),
  KEY `mg_SALES_SHIPMENT_GRID_TOTAL_QTY` (`total_qty`),
  KEY `mg_SALES_SHIPMENT_GRID_ORDER_INCREMENT_ID` (`order_increment_id`),
  KEY `mg_SALES_SHIPMENT_GRID_SHIPMENT_STATUS` (`shipment_status`),
  KEY `mg_SALES_SHIPMENT_GRID_ORDER_STATUS` (`order_status`),
  KEY `mg_SALES_SHIPMENT_GRID_CREATED_AT` (`created_at`),
  KEY `mg_SALES_SHIPMENT_GRID_UPDATED_AT` (`updated_at`),
  KEY `mg_SALES_SHIPMENT_GRID_ORDER_CREATED_AT` (`order_created_at`),
  KEY `mg_SALES_SHIPMENT_GRID_SHIPPING_NAME` (`shipping_name`),
  KEY `mg_SALES_SHIPMENT_GRID_BILLING_NAME` (`billing_name`),
  KEY `mg_SALES_SHIPMENT_GRID_ORDER_ID` (`order_id`),
  FULLTEXT KEY `FTI_0660C059FCD64B594430BAD2A34B0BA9` (`increment_id`,`order_increment_id`,`shipping_name`,`customer_name`,`customer_email`,`billing_address`,`shipping_address`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Flat Shipment Grid';

--
-- Dumping data for table `mg_sales_shipment_grid`
--


--
-- Table structure for table `mg_sales_shipment_item`
--

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

--
-- Dumping data for table `mg_sales_shipment_item`
--


--
-- Table structure for table `mg_sales_shipment_track`
--

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

--
-- Dumping data for table `mg_sales_shipment_track`
--


--
-- Table structure for table `mg_sales_shipping_aggregated`
--

CREATE TABLE `mg_sales_shipping_aggregated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_shipping` decimal(20,4) DEFAULT NULL COMMENT 'Total Shipping',
  `total_shipping_actual` decimal(20,4) DEFAULT NULL COMMENT 'Total Shipping Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_9BA127FB00B9D4A14A37F6574D5E1628` (`period`,`store_id`,`order_status`,`shipping_description`),
  KEY `mg_SALES_SHIPPING_AGGREGATED_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SALES_SHIPPING_AGGREGATED_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Shipping Aggregated';

--
-- Dumping data for table `mg_sales_shipping_aggregated`
--


--
-- Table structure for table `mg_sales_shipping_aggregated_order`
--

CREATE TABLE `mg_sales_shipping_aggregated_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `shipping_description` varchar(255) DEFAULT NULL COMMENT 'Shipping Description',
  `orders_count` int(11) NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `total_shipping` decimal(20,4) DEFAULT NULL COMMENT 'Total Shipping',
  `total_shipping_actual` decimal(20,4) DEFAULT NULL COMMENT 'Total Shipping Actual',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_FFC00FD9A23ABEF57E740B0115D76980` (`period`,`store_id`,`order_status`,`shipping_description`),
  KEY `mg_SALES_SHIPPING_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SALES_SHPP_AGGRED_ORDER_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Shipping Aggregated Order';

--
-- Dumping data for table `mg_sales_shipping_aggregated_order`
--


--
-- Table structure for table `mg_salesrule`
--

CREATE TABLE `mg_salesrule` (
  `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',
  `uses_per_customer` int(11) NOT NULL DEFAULT '0' COMMENT 'Uses Per Customer',
  `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',
  `is_advanced` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Is Advanced',
  `product_ids` text COMMENT 'Product Ids',
  `sort_order` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `simple_action` varchar(32) DEFAULT NULL COMMENT 'Simple Action',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `discount_qty` decimal(12,4) DEFAULT NULL COMMENT 'Discount Qty',
  `discount_step` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Discount Step',
  `apply_to_shipping` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Apply To Shipping',
  `times_used` int(11) NOT NULL DEFAULT '0' COMMENT 'Times Used',
  `is_rss` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Is Rss',
  `coupon_type` smallint(5) unsigned NOT NULL DEFAULT '1' COMMENT 'Coupon Type',
  `use_auto_generation` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Use Auto Generation',
  `uses_per_coupon` int(11) NOT NULL DEFAULT '0' COMMENT 'User Per Coupon',
  `simple_free_shipping` smallint(5) unsigned DEFAULT NULL COMMENT 'Simple Free Shipping',
  PRIMARY KEY (`rule_id`),
  KEY `mg_SALESRULE_IS_ACTIVE_SORT_ORDER_TO_DATE_FROM_DATE` (`is_active`,`sort_order`,`to_date`,`from_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Salesrule';

--
-- Dumping data for table `mg_salesrule`
--


--
-- Table structure for table `mg_salesrule_coupon`
--

CREATE TABLE `mg_salesrule_coupon` (
  `coupon_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Coupon ID',
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule ID',
  `code` varchar(255) DEFAULT NULL COMMENT 'Code',
  `usage_limit` int(10) unsigned DEFAULT NULL COMMENT 'Usage Limit',
  `usage_per_customer` int(10) unsigned DEFAULT NULL COMMENT 'Usage Per Customer',
  `times_used` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  `expiration_date` datetime DEFAULT NULL COMMENT 'Expiration Date',
  `is_primary` smallint(5) unsigned DEFAULT NULL COMMENT 'Is Primary',
  `created_at` timestamp NULL DEFAULT NULL COMMENT 'Coupon Code Creation Date',
  `type` smallint(6) DEFAULT '0' COMMENT 'Coupon Code Type',
  PRIMARY KEY (`coupon_id`),
  UNIQUE KEY `mg_SALESRULE_COUPON_CODE` (`code`),
  UNIQUE KEY `mg_SALESRULE_COUPON_RULE_ID_IS_PRIMARY` (`rule_id`,`is_primary`),
  KEY `mg_SALESRULE_COUPON_RULE_ID` (`rule_id`),
  CONSTRAINT `mg_SALESRULE_COUPON_RULE_ID_mg_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `mg_salesrule` (`rule_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Salesrule Coupon';

--
-- Dumping data for table `mg_salesrule_coupon`
--


--
-- Table structure for table `mg_salesrule_coupon_aggregated`
--

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

--
-- Dumping data for table `mg_salesrule_coupon_aggregated`
--


--
-- Table structure for table `mg_salesrule_coupon_aggregated_order`
--

CREATE TABLE `mg_salesrule_coupon_aggregated_order` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date NOT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `order_status` varchar(50) DEFAULT NULL COMMENT 'Order Status',
  `coupon_code` varchar(50) DEFAULT NULL COMMENT 'Coupon Code',
  `coupon_uses` int(11) NOT NULL DEFAULT '0' COMMENT 'Coupon Uses',
  `subtotal_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Subtotal Amount',
  `discount_amount` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Discount Amount',
  `total_amount` decimal(20,4) NOT NULL DEFAULT '0.0000' COMMENT 'Total Amount',
  `rule_name` varchar(255) DEFAULT NULL COMMENT 'Rule Name',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_D1503F028B39D307208B5D4A55397962` (`period`,`store_id`,`order_status`,`coupon_code`),
  KEY `mg_SALESRULE_COUPON_AGGREGATED_ORDER_STORE_ID` (`store_id`),
  KEY `mg_SALESRULE_COUPON_AGGREGATED_ORDER_RULE_NAME` (`rule_name`),
  CONSTRAINT `mg_SALESRULE_COUPON_AGGRED_ORDER_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Coupon Aggregated Order';

--
-- Dumping data for table `mg_salesrule_coupon_aggregated_order`
--


--
-- Table structure for table `mg_salesrule_coupon_aggregated_updated`
--

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

--
-- Dumping data for table `mg_salesrule_coupon_aggregated_updated`
--


--
-- Table structure for table `mg_salesrule_coupon_usage`
--

CREATE TABLE `mg_salesrule_coupon_usage` (
  `coupon_id` int(10) unsigned NOT NULL COMMENT 'Coupon ID',
  `customer_id` int(10) unsigned NOT NULL COMMENT 'Customer ID',
  `times_used` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  PRIMARY KEY (`coupon_id`,`customer_id`),
  KEY `mg_SALESRULE_COUPON_USAGE_CUSTOMER_ID` (`customer_id`),
  CONSTRAINT `FK_6A5DE9DEF99C62F7A570746C7D477433` FOREIGN KEY (`coupon_id`) REFERENCES `mg_salesrule_coupon` (`coupon_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALESRULE_COUPON_USAGE_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='Salesrule Coupon Usage';

--
-- Dumping data for table `mg_salesrule_coupon_usage`
--


--
-- Table structure for table `mg_salesrule_customer`
--

CREATE TABLE `mg_salesrule_customer` (
  `rule_customer_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rule Customer ID',
  `rule_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Rule ID',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer ID',
  `times_used` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Times Used',
  PRIMARY KEY (`rule_customer_id`),
  KEY `mg_SALESRULE_CUSTOMER_RULE_ID_CUSTOMER_ID` (`rule_id`,`customer_id`),
  KEY `mg_SALESRULE_CUSTOMER_CUSTOMER_ID_RULE_ID` (`customer_id`,`rule_id`),
  CONSTRAINT `mg_SALESRULE_CSTR_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALESRULE_CUSTOMER_RULE_ID_mg_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `mg_salesrule` (`rule_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Salesrule Customer';

--
-- Dumping data for table `mg_salesrule_customer`
--


--
-- Table structure for table `mg_salesrule_customer_group`
--

CREATE TABLE `mg_salesrule_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_SALESRULE_CUSTOMER_GROUP_CUSTOMER_GROUP_ID` (`customer_group_id`),
  CONSTRAINT `FK_F599EAF5E3C8694AB0B05FD19A9F7C41` FOREIGN KEY (`customer_group_id`) REFERENCES `mg_customer_group` (`customer_group_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALESRULE_CUSTOMER_GROUP_RULE_ID_mg_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `mg_salesrule` (`rule_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Rules To Customer Groups Relations';

--
-- Dumping data for table `mg_salesrule_customer_group`
--


--
-- Table structure for table `mg_salesrule_label`
--

CREATE TABLE `mg_salesrule_label` (
  `label_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Label ID',
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `label` varchar(255) DEFAULT NULL COMMENT 'Label',
  PRIMARY KEY (`label_id`),
  UNIQUE KEY `mg_SALESRULE_LABEL_RULE_ID_STORE_ID` (`rule_id`,`store_id`),
  KEY `mg_SALESRULE_LABEL_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SALESRULE_LABEL_RULE_ID_mg_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `mg_salesrule` (`rule_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALESRULE_LABEL_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Salesrule Label';

--
-- Dumping data for table `mg_salesrule_label`
--


--
-- Table structure for table `mg_salesrule_product_attribute`
--

CREATE TABLE `mg_salesrule_product_attribute` (
  `rule_id` int(10) unsigned NOT NULL COMMENT 'Rule ID',
  `website_id` smallint(5) unsigned NOT NULL COMMENT 'Website ID',
  `customer_group_id` int(10) unsigned NOT NULL COMMENT 'Customer Group ID',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  PRIMARY KEY (`rule_id`,`website_id`,`customer_group_id`,`attribute_id`),
  KEY `mg_SALESRULE_PRODUCT_ATTRIBUTE_WEBSITE_ID` (`website_id`),
  KEY `mg_SALESRULE_PRODUCT_ATTRIBUTE_CUSTOMER_GROUP_ID` (`customer_group_id`),
  KEY `mg_SALESRULE_PRODUCT_ATTRIBUTE_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `FK_5C6FB5B778D1DB61AA765B7085E71E13` FOREIGN KEY (`customer_group_id`) REFERENCES `mg_customer_group` (`customer_group_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALESRULE_PRD_ATTR_ATTR_ID_mg_EAV_ATTR_ATTR_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALESRULE_PRD_ATTR_WS_ID_mg_STORE_WS_WS_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALESRULE_PRODUCT_ATTRIBUTE_RULE_ID_mg_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `mg_salesrule` (`rule_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Salesrule Product Attribute';

--
-- Dumping data for table `mg_salesrule_product_attribute`
--


--
-- Table structure for table `mg_salesrule_website`
--

CREATE TABLE `mg_salesrule_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_SALESRULE_WEBSITE_WEBSITE_ID` (`website_id`),
  CONSTRAINT `mg_SALESRULE_WEBSITE_RULE_ID_mg_SALESRULE_RULE_ID` FOREIGN KEY (`rule_id`) REFERENCES `mg_salesrule` (`rule_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SALESRULE_WEBSITE_WEBSITE_ID_mg_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Sales Rules To Websites Relations';

--
-- Dumping data for table `mg_salesrule_website`
--


--
-- Table structure for table `mg_search_query`
--

CREATE TABLE `mg_search_query` (
  `query_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Query ID',
  `query_text` varchar(255) DEFAULT NULL COMMENT 'Query text',
  `num_results` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Num results',
  `popularity` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Popularity',
  `redirect` varchar(255) DEFAULT NULL COMMENT 'Redirect',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `display_in_terms` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Display in terms',
  `is_active` smallint(6) DEFAULT '1' COMMENT 'Active status',
  `is_processed` smallint(6) DEFAULT '0' COMMENT 'Processed status',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Updated at',
  PRIMARY KEY (`query_id`),
  UNIQUE KEY `mg_SEARCH_QUERY_QUERY_TEXT_STORE_ID` (`query_text`,`store_id`),
  KEY `mg_SEARCH_QUERY_IS_PROCESSED` (`is_processed`),
  KEY `mg_SEARCH_QUERY_STORE_ID_NUM_RESULTS_POPULARITY` (`store_id`,`num_results`,`popularity`),
  KEY `mg_SEARCH_QUERY_QUERY_TEXT_STORE_ID_NUM_RESULTS_POPULARITY` (`query_text`,`store_id`,`num_results`,`popularity`),
  CONSTRAINT `mg_SEARCH_QUERY_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COMMENT='Search query table';

--
-- Dumping data for table `mg_search_query`
--

INSERT INTO `mg_search_query` VALUES (1,'cocina',0,6,NULL,1,1,1,0,'2026-01-27 07:23:25'),(11,'monomando',0,2,NULL,1,1,1,0,'2025-11-28 19:06:23'),(12,'llaves',0,1,NULL,1,1,1,0,'2026-01-27 00:03:55'),(14,'tarjas',0,1,NULL,1,1,1,0,'2026-01-27 00:04:18');

--
-- Table structure for table `mg_search_synonyms`
--

CREATE TABLE `mg_search_synonyms` (
  `group_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Synonyms Group ID',
  `synonyms` text NOT NULL COMMENT 'list of synonyms making up this group',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID - identifies the store view these synonyms belong to',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID - identifies the website ID these synonyms belong to',
  PRIMARY KEY (`group_id`),
  KEY `mg_SEARCH_SYNONYMS_STORE_ID` (`store_id`),
  KEY `mg_SEARCH_SYNONYMS_WEBSITE_ID` (`website_id`),
  FULLTEXT KEY `mg_SEARCH_SYNONYMS_SYNONYMS` (`synonyms`),
  CONSTRAINT `mg_SEARCH_SYNONYMS_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_SEARCH_SYNONYMS_WEBSITE_ID_mg_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='table storing various synonyms groups';

--
-- Dumping data for table `mg_search_synonyms`
--


--
-- Table structure for table `mg_sendfriend_log`
--

CREATE TABLE `mg_sendfriend_log` (
  `log_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Log ID',
  `ip` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer IP address',
  `time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Log time',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  PRIMARY KEY (`log_id`),
  KEY `mg_SENDFRIEND_LOG_IP` (`ip`),
  KEY `mg_SENDFRIEND_LOG_TIME` (`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Send to friend function log storage table';

--
-- Dumping data for table `mg_sendfriend_log`
--


--
-- Table structure for table `mg_sequence_creditmemo_0`
--

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

--
-- Dumping data for table `mg_sequence_creditmemo_0`
--


--
-- Table structure for table `mg_sequence_creditmemo_1`
--

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

--
-- Dumping data for table `mg_sequence_creditmemo_1`
--


--
-- Table structure for table `mg_sequence_invoice_0`
--

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

--
-- Dumping data for table `mg_sequence_invoice_0`
--


--
-- Table structure for table `mg_sequence_invoice_1`
--

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

--
-- Dumping data for table `mg_sequence_invoice_1`
--


--
-- Table structure for table `mg_sequence_order_0`
--

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

--
-- Dumping data for table `mg_sequence_order_0`
--


--
-- Table structure for table `mg_sequence_order_1`
--

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

--
-- Dumping data for table `mg_sequence_order_1`
--


--
-- Table structure for table `mg_sequence_shipment_0`
--

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

--
-- Dumping data for table `mg_sequence_shipment_0`
--


--
-- Table structure for table `mg_sequence_shipment_1`
--

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

--
-- Dumping data for table `mg_sequence_shipment_1`
--


--
-- Table structure for table `mg_session`
--

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

--
-- Dumping data for table `mg_session`
--

INSERT INTO `mg_session` VALUES ('0092d131a9881df61b889c7a75f5d34eb4093abf5270c97d0f1630a1a02024e5',1769623474,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiMzQuMjAzLjIwMi41NiI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjEyMToiTW96aWxsYS81LjAgKExpbnV4OyBBbmRyb2lkIDExOyBDUEgyMzczKSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTAxLjAuNDk1MS40MSBNb2JpbGUgU2FmYXJpLzUzNy4zNiI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjA6e31hZG1pbmh0bWx8YTowOnt9bWVzc2FnZXxhOjA6e31hZG1pbmh0bWxfcXVvdGV8YToxOntzOjg6InN0b3JlX2lkIjtzOjE6IjEiO30='),('3215cae52418a0388802c28a7113e29999e278975ac9d29f524d486c164031f5',1769622236,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiNTcuMTI5LjEzNy4xOTAiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czo3ODoiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6ODkuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC84OS4wIjt9X3Nlc3Npb25faG9zdHN8YToxOntzOjEzOiJnYW1hbm9ydGUuY29tIjtiOjE7fWRlZmF1bHR8YTowOnt9Y3VzdG9tZXJfYmFzZXxhOjA6e31jaGVja291dHxhOjA6e31jYXRhbG9nfGE6MDp7fWFkbWluaHRtbHxhOjA6e31tZXNzYWdlfGE6MDp7fWFkbWluaHRtbF9xdW90ZXxhOjE6e3M6ODoic3RvcmVfaWQiO3M6MToiMSI7fQ=='),('36f7d2cb8eaa2902c340d0008f65d9c83edd4f619764e32792b6cf188b34a572',1769614759,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiMjE2LjI0NC42Ni4yMzciO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czo4ODoiTW96aWxsYS81LjAgKGNvbXBhdGlibGU7IERvdEJvdC8xLjI7ICtodHRwczovL29wZW5zaXRlZXhwbG9yZXIub3JnL2RvdGJvdDsgaGVscEBtb3ouY29tKSI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjA6e31tZXNzYWdlfGE6MDp7fQ=='),('4d2e78bf114a6a563029ce0d58946192d9967a8dc964e5da91d1f9e0aa0e3ce2',1769612114,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMjoiNzQuNy4xNzUuMTcxIjtzOjg6Imh0dHBfdmlhIjtzOjA6IiI7czoyMDoiaHR0cF94X2ZvcndhcmRlZF9mb3IiO3M6MDoiIjtzOjE1OiJodHRwX3VzZXJfYWdlbnQiO3M6MTkxOiJNb3ppbGxhLzUuMCAoTWFjaW50b3NoOyBJbnRlbCBNYWMgT1MgWCAxMF8xNV83KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTMxLjAuMC4wIFNhZmFyaS81MzcuMzY7IGNvbXBhdGlibGU7IE9BSS1TZWFyY2hCb3QvMS4zOyByb2JvdHMudHh0OyAraHR0cHM6Ly9vcGVuYWkuY29tL3NlYXJjaGJvdCI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjA6e31tZXNzYWdlfGE6MDp7fQ=='),('55657596318aa5d5cc2388982257ad3c575c3a0afe2633cc27a5db46b99386c5',1769617550,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiMzcuNzcuMTUwLjEyNCI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjgwOiJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0OyBydjoxMzQuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC8xMzUuMCI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjA6e31hZG1pbmh0bWx8YTowOnt9bWVzc2FnZXxhOjA6e31hZG1pbmh0bWxfcXVvdGV8YToxOntzOjg6InN0b3JlX2lkIjtzOjE6IjEiO30='),('63cd082aa1b771e2b735d76b0976f3361b1b5c1467a789dee7dac67de57189c5',1769621740,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMToiNS43OC4xMjIuODEiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czo4MToiTW96aWxsYS81LjAgKGNvbXBhdGlibGU7IFNhbnNlYyBTZWN1cml0eSBNb25pdG9yLzEuMDsgK2h0dHBzOi8vc2Fuc2VjLmlvL21vbml0b3IpIjt9X3Nlc3Npb25faG9zdHN8YToxOntzOjEzOiJnYW1hbm9ydGUuY29tIjtiOjE7fWRlZmF1bHR8YTowOnt9Y3VzdG9tZXJfYmFzZXxhOjA6e31jaGVja291dHxhOjA6e31jYXRhbG9nfGE6MDp7fW1lc3NhZ2V8YTowOnt9YWRtaW5odG1sfGE6MDp7fWFkbWluaHRtbF9xdW90ZXxhOjE6e3M6ODoic3RvcmVfaWQiO3M6MToiMSI7fQ=='),('701c4e6fc4706a6e547c61d12d743a314d4e514fee9f090fdf80f270a5ec4403',1769619572,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMjoiNDAuNzcuMTY3LjU4IjtzOjg6Imh0dHBfdmlhIjtzOjA6IiI7czoyMDoiaHR0cF94X2ZvcndhcmRlZF9mb3IiO3M6MDoiIjtzOjE1OiJodHRwX3VzZXJfYWdlbnQiO3M6MTQ0OiJNb3ppbGxhLzUuMCBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvOyBjb21wYXRpYmxlOyBiaW5nYm90LzIuMDsgK2h0dHA6Ly93d3cuYmluZy5jb20vYmluZ2JvdC5odG0pIENocm9tZS8xMTYuMC4xOTM4Ljc2IFNhZmFyaS81MzcuMzYiO31fc2Vzc2lvbl9ob3N0c3xhOjE6e3M6MTM6ImdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjA6e31jdXN0b21lcl9iYXNlfGE6MDp7fWNoZWNrb3V0fGE6MDp7fWNhdGFsb2d8YTowOnt9YWRtaW5odG1sfGE6MDp7fW1lc3NhZ2V8YTowOnt9YWRtaW5odG1sX3F1b3RlfGE6MTp7czo4OiJzdG9yZV9pZCI7czoxOiIxIjt9'),('74f102576761f75fbac7cabd3e48909b51669476fc994f01fa613c0859b12ffb',1769623474,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiMzQuMjAzLjIwMi41NiI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjEwMzoiTW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvNTUuMC4yODc2LjAgU2FmYXJpLzUzNy4zNiI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjA6e31hZG1pbmh0bWx8YTowOnt9bWVzc2FnZXxhOjA6e31hZG1pbmh0bWxfcXVvdGV8YToxOntzOjg6InN0b3JlX2lkIjtzOjE6IjEiO30='),('7848fc8be36d3151c7ef79ddf8c1a317e98205cda22baa5b91f25965dc4283f7',1769615137,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiMjE2LjI0NC42Ni4yMzciO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czo4ODoiTW96aWxsYS81LjAgKGNvbXBhdGlibGU7IERvdEJvdC8xLjI7ICtodHRwczovL29wZW5zaXRlZXhwbG9yZXIub3JnL2RvdGJvdDsgaGVscEBtb3ouY29tKSI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9'),('7d3ebefdddce68bf552c48c16f169bd0fcebed132c37180a3751a2af2b0ed809',1769622234,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiNTcuMTI5LjEzNy4xOTAiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czoxMTk6Ik1vemlsbGEvNS4wIChNYWNpbnRvc2g7IEludGVsIE1hYyBPUyBYIDEwXzE1XzcpIEFwcGxlV2ViS2l0LzYwNS4xLjE1IChLSFRNTCwgbGlrZSBHZWNrbykgVmVyc2lvbi8xNC4xLjEgU2FmYXJpLzYwNS4xLjE1Ijt9X3Nlc3Npb25faG9zdHN8YToxOntzOjEzOiJnYW1hbm9ydGUuY29tIjtiOjE7fWRlZmF1bHR8YTowOnt9Y3VzdG9tZXJfYmFzZXxhOjA6e31jaGVja291dHxhOjA6e31jYXRhbG9nfGE6MDp7fWFkbWluaHRtbHxhOjA6e31tZXNzYWdlfGE6MDp7fWFkbWluaHRtbF9xdW90ZXxhOjE6e3M6ODoic3RvcmVfaWQiO3M6MToiMSI7fQ=='),('86438df0f2b3741d0cb4937e27fe1b8aef30beb3d418531b3ba3120dad983cb1',1769619304,'[encoded data, 12404 characters]'),('86591946ebf638665ff4a17696ef651ae03274b8a100538e0d0e145c1faca74a',1769611546,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiMTg1LjE5MS4xNzEuOCI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjc1OiJNb3ppbGxhLzUuMCAoY29tcGF0aWJsZTsgU2VtcnVzaEJvdC83fmJsOyAraHR0cDovL3d3dy5zZW1ydXNoLmNvbS9ib3QuaHRtbCkiO31fc2Vzc2lvbl9ob3N0c3xhOjE6e3M6MTM6ImdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjE6e3M6OToiX2Zvcm1fa2V5IjtzOjE2OiJCV296SENhNEpyaGVJVHdzIjt9Y3VzdG9tZXJfYmFzZXxhOjA6e31jaGVja291dHxhOjA6e31jYXRhbG9nfGE6MDp7fWFkbWluaHRtbHxhOjA6e31tZXNzYWdlfGE6MTp7czo3OiJkZWZhdWx0IjtPOjM2OiJNYWdlbnRvXEZyYW1ld29ya1xNZXNzYWdlXENvbGxlY3Rpb24iOjI6e3M6MTE6IgAqAG1lc3NhZ2VzIjthOjA6e31zOjE5OiIAKgBsYXN0QWRkZWRNZXNzYWdlIjtOO319YWRtaW5odG1sX3F1b3RlfGE6MTp7czo4OiJzdG9yZV9pZCI7czoxOiIxIjt9'),('92494aeaef1c8bc60f922724d2c1f61deb5cdb384a9319464947c836eae2d148',1769623172,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiMTM4LjEyOC4xNDAuODMiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czoxMDQ6Ik1vemlsbGEvNS4wIChMaW51eDsgQW5kcm9pZCAxMDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBPcGVyYS82Mi4wLjAuMCBTYWZhcmkvNTM3LjM2Ijt9X3Nlc3Npb25faG9zdHN8YToxOntzOjEzOiJnYW1hbm9ydGUuY29tIjtiOjE7fWRlZmF1bHR8YToyOntzOjEyOiJ2aXNpdG9yX2RhdGEiO2E6Mzp7czoxMzoibGFzdF92aXNpdF9hdCI7czoxOToiMjAyNi0wMS0yOCAxNzo1OTozMiI7czoxMDoidmlzaXRvcl9pZCI7czozOiI0NjIiO3M6MTA6InNlc3Npb25faWQiO3M6MzI6IjcwY2ZiYzU2ZTVkY2RmYjg5ZDMyYzdlMDdhYzcxNTNhIjt9czo5OiJfZm9ybV9rZXkiO3M6MTY6IkNKUzdwWDZ4UWViVDRsQmgiO31jdXN0b21lcl9iYXNlfGE6MDp7fWNoZWNrb3V0fGE6MDp7fWNhdGFsb2d8YTowOnt9YWRtaW5odG1sfGE6MDp7fW1lc3NhZ2V8YToxOntzOjc6ImRlZmF1bHQiO086MzY6Ik1hZ2VudG9cRnJhbWV3b3JrXE1lc3NhZ2VcQ29sbGVjdGlvbiI6Mjp7czoxMToiACoAbWVzc2FnZXMiO2E6MDp7fXM6MTk6IgAqAGxhc3RBZGRlZE1lc3NhZ2UiO047fX1hZG1pbmh0bWxfcXVvdGV8YToxOntzOjg6InN0b3JlX2lkIjtzOjE6IjEiO30='),('93b83acf8a684b402b254d6ecc7161b6edbbf0c868dfb9dbb18e78fe5dca7cd5',1769622233,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiNTcuMTI5LjEzNy4xOTAiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czoxMTU6Ik1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS85MS4wLjQ0NzIuMTI0IFNhZmFyaS81MzcuMzYiO31fc2Vzc2lvbl9ob3N0c3xhOjE6e3M6MTM6ImdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjA6e31jdXN0b21lcl9iYXNlfGE6MDp7fWNoZWNrb3V0fGE6MDp7fWNhdGFsb2d8YTowOnt9YWRtaW5odG1sfGE6MDp7fW1lc3NhZ2V8YTowOnt9YWRtaW5odG1sX3F1b3RlfGE6MTp7czo4OiJzdG9yZV9pZCI7czoxOiIxIjt9'),('95f9a84333d5978c043f562c1a6c9d591be7cfce0a5f4cd1e6896345b3b9cce5',1769617033,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiNTEuMzguMTg3LjExMiI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjExMToiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEzOS4wLjAuMCBTYWZhcmkvNTM3LjM2Ijt9X3Nlc3Npb25faG9zdHN8YToxOntzOjEzOiJnYW1hbm9ydGUuY29tIjtiOjE7fWRlZmF1bHR8YToxOntzOjk6Il9mb3JtX2tleSI7czoxNjoiWkZ0QUc1UzdlN09yODJvbCI7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjA6e31hZG1pbmh0bWx8YTowOnt9bWVzc2FnZXxhOjE6e3M6NzoiZGVmYXVsdCI7TzozNjoiTWFnZW50b1xGcmFtZXdvcmtcTWVzc2FnZVxDb2xsZWN0aW9uIjoyOntzOjExOiIAKgBtZXNzYWdlcyI7YTowOnt9czoxOToiACoAbGFzdEFkZGVkTWVzc2FnZSI7Tjt9fWFkbWluaHRtbF9xdW90ZXxhOjE6e3M6ODoic3RvcmVfaWQiO3M6MToiMSI7fQ=='),('99a345059ca87619b67224d756833a8f8d4ebf4db4d630da0f376879b15e82aa',1769619207,'[encoded data, 10512 characters]'),('99c1b0ec0f63e390ba49888085c226d1e460e16b5ed620661c536649711ff7e9',1769611205,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMjoiNTQuMzkuODkuMTI1IjtzOjg6Imh0dHBfdmlhIjtzOjA6IiI7czoyMDoiaHR0cF94X2ZvcndhcmRlZF9mb3IiO3M6MDoiIjtzOjE1OiJodHRwX3VzZXJfYWdlbnQiO3M6NjY6Ik1vemlsbGEvNS4wIChjb21wYXRpYmxlOyBBaHJlZnNCb3QvNy4wOyAraHR0cDovL2FocmVmcy5jb20vcm9ib3QvKSI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjI6e3M6MjQ6Imxhc3RfdmlzaXRlZF9jYXRlZ29yeV9pZCI7czoyOiIyMSI7czoyMzoibGFzdF92aWV3ZWRfY2F0ZWdvcnlfaWQiO3M6MjoiMjEiO31hZG1pbmh0bWx8YTowOnt9bWVzc2FnZXxhOjA6e31hZG1pbmh0bWxfcXVvdGV8YToxOntzOjg6InN0b3JlX2lkIjtzOjE6IjEiO30='),('a0b2d0d59443977459bef8baa5df80bf4c2f4c1880ac4be7a5c72837439d6526',1769617544,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiMzcuNzcuMTUwLjEyNCI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjgwOiJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0OyBydjoxMzQuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC8xMzUuMCI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjA6e31hZG1pbmh0bWx8YTowOnt9bWVzc2FnZXxhOjA6e31hZG1pbmh0bWxfcXVvdGV8YToxOntzOjg6InN0b3JlX2lkIjtzOjE6IjEiO30='),('b0930993f7802130485242b056112ff0e00eacdb888f1d403218ccf2434ed350',1769621953,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiMTg1LjE5MS4xNzEuOCI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjc1OiJNb3ppbGxhLzUuMCAoY29tcGF0aWJsZTsgU2VtcnVzaEJvdC83fmJsOyAraHR0cDovL3d3dy5zZW1ydXNoLmNvbS9ib3QuaHRtbCkiO31fc2Vzc2lvbl9ob3N0c3xhOjE6e3M6MTM6ImdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjA6e31jdXN0b21lcl9iYXNlfGE6MDp7fWNoZWNrb3V0fGE6MDp7fWNhdGFsb2d8YTowOnt9bWVzc2FnZXxhOjA6e30='),('b85302b13dd32cba5f29b7e232f5980b01019069921c1bd3bda48093e56c998c',1769617032,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMjoiNTEuOTEuMjU0LjQzIjtzOjg6Imh0dHBfdmlhIjtzOjA6IiI7czoyMDoiaHR0cF94X2ZvcndhcmRlZF9mb3IiO3M6MDoiIjtzOjE1OiJodHRwX3VzZXJfYWdlbnQiO3M6MTExOiJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTM5LjAuMC4wIFNhZmFyaS81MzcuMzYiO31fc2Vzc2lvbl9ob3N0c3xhOjE6e3M6MTM6ImdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjE6e3M6OToiX2Zvcm1fa2V5IjtzOjE2OiI5a3BsT3hrdk51ckltcHBXIjt9Y3VzdG9tZXJfYmFzZXxhOjA6e31jaGVja291dHxhOjA6e31jYXRhbG9nfGE6MDp7fWFkbWluaHRtbHxhOjA6e31tZXNzYWdlfGE6MTp7czo3OiJkZWZhdWx0IjtPOjM2OiJNYWdlbnRvXEZyYW1ld29ya1xNZXNzYWdlXENvbGxlY3Rpb24iOjI6e3M6MTE6IgAqAG1lc3NhZ2VzIjthOjA6e31zOjE5OiIAKgBsYXN0QWRkZWRNZXNzYWdlIjtOO319YWRtaW5odG1sX3F1b3RlfGE6MTp7czo4OiJzdG9yZV9pZCI7czoxOiIxIjt9'),('c46de191f94ddf76e5c55b91ebd10f39e590026157a720abbdf92a69057a0aa8',1769611545,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiMTg1LjE5MS4xNzEuMTgiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czo3NToiTW96aWxsYS81LjAgKGNvbXBhdGlibGU7IFNlbXJ1c2hCb3QvN35ibDsgK2h0dHA6Ly93d3cuc2VtcnVzaC5jb20vYm90Lmh0bWwpIjt9X3Nlc3Npb25faG9zdHN8YToxOntzOjEzOiJnYW1hbm9ydGUuY29tIjtiOjE7fWRlZmF1bHR8YTowOnt9Y3VzdG9tZXJfYmFzZXxhOjA6e31jaGVja291dHxhOjA6e31jYXRhbG9nfGE6MDp7fW1lc3NhZ2V8YTowOnt9'),('c4f51fcdaeb03f14e208e7b2e52fb29b5c23211b7bc5e96e38f058f3a262caf2',1769622233,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiNTcuMTI5LjEzNy4xOTAiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czoxMTk6Ik1vemlsbGEvNS4wIChNYWNpbnRvc2g7IEludGVsIE1hYyBPUyBYIDEwXzE1XzcpIEFwcGxlV2ViS2l0LzYwNS4xLjE1IChLSFRNTCwgbGlrZSBHZWNrbykgVmVyc2lvbi8xNC4xLjEgU2FmYXJpLzYwNS4xLjE1Ijt9X3Nlc3Npb25faG9zdHN8YToxOntzOjE3OiJ3d3cuZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9'),('d2e57df2f88c489ff2ef879be19639f5f0271733163b918b64a4cc7bda72ef10',1769612114,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMjoiNzQuNy4xNzUuMTcxIjtzOjg6Imh0dHBfdmlhIjtzOjA6IiI7czoyMDoiaHR0cF94X2ZvcndhcmRlZF9mb3IiO3M6MDoiIjtzOjE1OiJodHRwX3VzZXJfYWdlbnQiO3M6MTkxOiJNb3ppbGxhLzUuMCAoTWFjaW50b3NoOyBJbnRlbCBNYWMgT1MgWCAxMF8xNV83KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvMTMxLjAuMC4wIFNhZmFyaS81MzcuMzY7IGNvbXBhdGlibGU7IE9BSS1TZWFyY2hCb3QvMS4zOyByb2JvdHMudHh0OyAraHR0cHM6Ly9vcGVuYWkuY29tL3NlYXJjaGJvdCI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxNzoid3d3LmdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjA6e31jdXN0b21lcl9iYXNlfGE6MDp7fQ=='),('de51212a10e1e751a6a52aa8bc22c99bc4542ebb18234580d64778eebc951379',1769617554,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiMzcuNzcuMTUwLjEyNCI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjgwOiJNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0OyBydjoxMzQuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC8xMzUuMCI7fV9zZXNzaW9uX2hvc3RzfGE6MTp7czoxMzoiZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9Y2hlY2tvdXR8YTowOnt9Y2F0YWxvZ3xhOjA6e31hZG1pbmh0bWx8YTowOnt9bWVzc2FnZXxhOjA6e31hZG1pbmh0bWxfcXVvdGV8YToxOntzOjg6InN0b3JlX2lkIjtzOjE6IjEiO30='),('def5bdd50e42383c5e9fd17aaf15f0b4518aef0cf47e13d1ba2a5166b9117c8f',1769622233,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiNTcuMTI5LjEzNy4xOTAiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czo3ODoiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NDsgcnY6ODkuMCkgR2Vja28vMjAxMDAxMDEgRmlyZWZveC84OS4wIjt9X3Nlc3Npb25faG9zdHN8YToxOntzOjE3OiJ3d3cuZ2FtYW5vcnRlLmNvbSI7YjoxO31kZWZhdWx0fGE6MDp7fWN1c3RvbWVyX2Jhc2V8YTowOnt9'),('e6928e13d9373d06df4c0667e88332c4ec8e2e6a339662b515d087a5f0ce197f',1769617216,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiNTEuMTYxLjM3LjE4NCI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjY2OiJNb3ppbGxhLzUuMCAoY29tcGF0aWJsZTsgQWhyZWZzQm90LzcuMDsgK2h0dHA6Ly9haHJlZnMuY29tL3JvYm90LykiO31fc2Vzc2lvbl9ob3N0c3xhOjE6e3M6MTM6ImdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjA6e31jdXN0b21lcl9iYXNlfGE6MDp7fWNoZWNrb3V0fGE6MDp7fWNhdGFsb2d8YToxOntzOjIyOiJsYXN0X3ZpZXdlZF9wcm9kdWN0X2lkIjtzOjE6IjEiO31hZG1pbmh0bWx8YTowOnt9YWRtaW5odG1sX3F1b3RlfGE6MTp7czo4OiJzdG9yZV9pZCI7czoxOiIxIjt9bWVzc2FnZXxhOjA6e30='),('e7bf6553f5a4eac57b34d71185af2376aa09230974046aaed08dfc7d3a4cfe4c',1769621954,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxMzoiMTg1LjE5MS4xNzEuMyI7czo4OiJodHRwX3ZpYSI7czowOiIiO3M6MjA6Imh0dHBfeF9mb3J3YXJkZWRfZm9yIjtzOjA6IiI7czoxNToiaHR0cF91c2VyX2FnZW50IjtzOjc1OiJNb3ppbGxhLzUuMCAoY29tcGF0aWJsZTsgU2VtcnVzaEJvdC83fmJsOyAraHR0cDovL3d3dy5zZW1ydXNoLmNvbS9ib3QuaHRtbCkiO31fc2Vzc2lvbl9ob3N0c3xhOjE6e3M6MTM6ImdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjE6e3M6OToiX2Zvcm1fa2V5IjtzOjE2OiJQOWg3UnRQU3htZHJacnQwIjt9Y3VzdG9tZXJfYmFzZXxhOjA6e31jaGVja291dHxhOjA6e31jYXRhbG9nfGE6MDp7fWFkbWluaHRtbHxhOjA6e31tZXNzYWdlfGE6MTp7czo3OiJkZWZhdWx0IjtPOjM2OiJNYWdlbnRvXEZyYW1ld29ya1xNZXNzYWdlXENvbGxlY3Rpb24iOjI6e3M6MTE6IgAqAG1lc3NhZ2VzIjthOjA6e31zOjE5OiIAKgBsYXN0QWRkZWRNZXNzYWdlIjtOO319YWRtaW5odG1sX3F1b3RlfGE6MTp7czo4OiJzdG9yZV9pZCI7czoxOiIxIjt9'),('ef015b8fcffd1f0080d7eb56b2d49ffbfed91ffbb39ac4a117797f00c1ff6131',1769622234,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNDoiNTcuMTI5LjEzNy4xOTAiO3M6ODoiaHR0cF92aWEiO3M6MDoiIjtzOjIwOiJodHRwX3hfZm9yd2FyZGVkX2ZvciI7czowOiIiO3M6MTU6Imh0dHBfdXNlcl9hZ2VudCI7czoxMTU6Ik1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUzNy4zNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS85MS4wLjQ0NzIuMTI0IFNhZmFyaS81MzcuMzYiO31fc2Vzc2lvbl9ob3N0c3xhOjE6e3M6MTM6ImdhbWFub3J0ZS5jb20iO2I6MTt9ZGVmYXVsdHxhOjA6e31jdXN0b21lcl9iYXNlfGE6MDp7fWNoZWNrb3V0fGE6MDp7fWNhdGFsb2d8YTowOnt9YWRtaW5odG1sfGE6MDp7fW1lc3NhZ2V8YTowOnt9YWRtaW5odG1sX3F1b3RlfGE6MTp7czo4OiJzdG9yZV9pZCI7czoxOiIxIjt9'),('fffabf3d6cff2e100b41dbfd60640aacfa42c08ae76602c6e1d39271511612b8',1769610315,'X3Nlc3Npb25fdmFsaWRhdG9yX2RhdGF8YTo0OntzOjExOiJyZW1vdGVfYWRkciI7czoxNToiMTgwLjExMC4yMDMuMTA4IjtzOjg6Imh0dHBfdmlhIjtzOjA6IiI7czoyMDoiaHR0cF94X2ZvcndhcmRlZF9mb3IiO3M6MDoiIjtzOjE1OiJodHRwX3VzZXJfYWdlbnQiO3M6MTM5OiJNb3ppbGxhLzUuMCAoaVBob25lOyBDUFUgaVBob25lIE9TIDEzXzJfMyBsaWtlIE1hYyBPUyBYKSBBcHBsZVdlYktpdC82MDUuMS4xNSAoS0hUTUwsIGxpa2UgR2Vja28pIFZlcnNpb24vMTMuMC4zIE1vYmlsZS8xNUUxNDggU2FmYXJpLzYwNC4xIjt9X3Nlc3Npb25faG9zdHN8YToxOntzOjEzOiJnYW1hbm9ydGUuY29tIjtiOjE7fWRlZmF1bHR8YTowOnt9Y3VzdG9tZXJfYmFzZXxhOjA6e31jaGVja291dHxhOjA6e31jYXRhbG9nfGE6MDp7fWFkbWluaHRtbHxhOjA6e31tZXNzYWdlfGE6MDp7fWFkbWluaHRtbF9xdW90ZXxhOjE6e3M6ODoic3RvcmVfaWQiO3M6MToiMSI7fQ==');

--
-- Table structure for table `mg_setup_module`
--

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

--
-- Dumping data for table `mg_setup_module`
--

INSERT INTO `mg_setup_module` VALUES ('Gama_CustomMenuLinks','1.0.0','1.0.0'),('Gama_Datapatchs','1.0.0','1.0.0'),('Magefan_AdminUserGuide','2.0.1','2.0.1'),('Magefan_Blog','2.10.9','2.10.9'),('Magefan_Community','2.1.10','2.1.10'),('Magefan_WysiwygAdvanced','2.0.12','2.0.12'),('Magento_DataExporter','42.0.1','42.0.1'),('Magento_PageBuilderImageAttribute','1.0.0','1.0.0'),('Magento_QueryXml','42.0.0','42.0.0'),('Magento_Securitytxt','1.0.0','1.0.0'),('Magento_ServicesConnector','1.1.0','1.1.0'),('Magento_ServicesId','1.1.0','1.1.0'),('Magento_ServicesIdLayout','1.0.0','1.0.0'),('PayPal_Braintree','4.6.1','4.6.1'),('Sm_AttributesSearch','2.0.0','2.0.0'),('Sm_AutoCompleteSearch','2.0.0','2.0.0'),('Sm_BackEnd','1.0.0','1.0.0'),('Sm_BundleImage','1.0.0','1.0.0'),('Sm_CartQuickPro','1.5.0','1.5.0'),('Sm_Categories','3.2.0','3.2.0'),('Sm_DegreeView','1.0.0','1.0.0'),('Sm_FilterProducts','1.3.0','1.3.0'),('Sm_ListingTabs','2.7.0','2.7.0'),('Sm_Market','1.0.0','1.0.0'),('Sm_MegaMenu','3.3.0','3.3.0'),('Sm_SearchBox','2.1.0','2.1.0'),('Sm_ShopBy','2.0.0','2.0.0'),('Sm_SizeChart','1.0.0','1.0.0'),('Sm_Themecore','2.0.0','2.0.0');

--
-- Table structure for table `mg_shipping_tablerate`
--

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

--
-- Dumping data for table `mg_shipping_tablerate`
--


--
-- Table structure for table `mg_sitemap`
--

CREATE TABLE `mg_sitemap` (
  `sitemap_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Sitemap ID',
  `sitemap_type` varchar(32) DEFAULT NULL COMMENT 'Sitemap Type',
  `sitemap_filename` varchar(32) DEFAULT NULL COMMENT 'Sitemap Filename',
  `sitemap_path` varchar(255) DEFAULT NULL COMMENT 'Sitemap Path',
  `sitemap_time` timestamp NULL DEFAULT NULL COMMENT 'Sitemap Time',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  PRIMARY KEY (`sitemap_id`),
  KEY `mg_SITEMAP_STORE_ID` (`store_id`),
  CONSTRAINT `mg_SITEMAP_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='XML Sitemap';

--
-- Dumping data for table `mg_sitemap`
--


--
-- Table structure for table `mg_store`
--

CREATE TABLE `mg_store` (
  `store_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Store ID',
  `code` varchar(32) DEFAULT NULL COMMENT 'Code',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Group ID',
  `name` varchar(255) NOT NULL COMMENT 'Store Name',
  `sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Sort Order',
  `is_active` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store Activity',
  PRIMARY KEY (`store_id`),
  UNIQUE KEY `mg_STORE_CODE` (`code`),
  KEY `mg_STORE_WEBSITE_ID` (`website_id`),
  KEY `mg_STORE_IS_ACTIVE_SORT_ORDER` (`is_active`,`sort_order`),
  KEY `mg_STORE_GROUP_ID` (`group_id`),
  CONSTRAINT `mg_STORE_GROUP_ID_mg_STORE_GROUP_GROUP_ID` FOREIGN KEY (`group_id`) REFERENCES `mg_store_group` (`group_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_STORE_WEBSITE_ID_mg_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='Stores';

--
-- Dumping data for table `mg_store`
--

INSERT INTO `mg_store` VALUES (0,'admin',0,0,'Admin',0,1),(1,'default',1,1,'Default Store View',0,1);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_after_insert` AFTER INSERT ON `mg_store` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (NEW.`website_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_after_update` AFTER UPDATE ON `mg_store` FOR EACH ROW BEGIN
IF (NOT(NEW.`store_id` <=> OLD.`store_id`) OR NOT(NEW.`code` <=> OLD.`code`) OR NOT(NEW.`website_id` <=> OLD.`website_id`) OR NOT(NEW.`group_id` <=> OLD.`group_id`) OR NOT(NEW.`name` <=> OLD.`name`) OR NOT(NEW.`sort_order` <=> OLD.`sort_order`) OR NOT(NEW.`is_active` <=> OLD.`is_active`)) THEN INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (NEW.`website_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_after_delete` AFTER DELETE ON `mg_store` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (OLD.`website_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_store_data_exporter_cl`
--

CREATE TABLE `mg_store_data_exporter_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=3 DEFAULT CHARSET=utf8mb4 COMMENT='mg_store_data_exporter_cl';

--
-- Dumping data for table `mg_store_data_exporter_cl`
--

INSERT INTO `mg_store_data_exporter_cl` VALUES (1,0),(2,1);

--
-- Table structure for table `mg_store_group`
--

CREATE TABLE `mg_store_group` (
  `group_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Group ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `name` varchar(255) NOT NULL COMMENT 'Store Group Name',
  `root_category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Root Category ID',
  `default_store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Default Store ID',
  `code` varchar(32) DEFAULT NULL COMMENT 'Store group unique code',
  PRIMARY KEY (`group_id`),
  UNIQUE KEY `mg_STORE_GROUP_CODE` (`code`),
  KEY `mg_STORE_GROUP_WEBSITE_ID` (`website_id`),
  KEY `mg_STORE_GROUP_DEFAULT_STORE_ID` (`default_store_id`),
  CONSTRAINT `mg_STORE_GROUP_WEBSITE_ID_mg_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='Store Groups';

--
-- Dumping data for table `mg_store_group`
--

INSERT INTO `mg_store_group` VALUES (0,0,'Default',0,0,'default'),(1,1,'Main Website Store',2,1,'main_website_store');
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_group_after_insert` AFTER INSERT ON `mg_store_group` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (NEW.`website_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_group_after_update` AFTER UPDATE ON `mg_store_group` FOR EACH ROW BEGIN
IF (NOT(NEW.`group_id` <=> OLD.`group_id`) OR NOT(NEW.`website_id` <=> OLD.`website_id`) OR NOT(NEW.`name` <=> OLD.`name`) OR NOT(NEW.`root_category_id` <=> OLD.`root_category_id`) OR NOT(NEW.`default_store_id` <=> OLD.`default_store_id`) OR NOT(NEW.`code` <=> OLD.`code`)) THEN INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (NEW.`website_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_group_after_delete` AFTER DELETE ON `mg_store_group` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (OLD.`website_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_store_website`
--

CREATE TABLE `mg_store_website` (
  `website_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Website ID',
  `code` varchar(32) DEFAULT NULL COMMENT 'Code',
  `name` varchar(64) DEFAULT NULL COMMENT 'Website Name',
  `sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `default_group_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Default Group ID',
  `is_default` smallint(5) unsigned DEFAULT '0' COMMENT 'Defines Is Website Default',
  PRIMARY KEY (`website_id`),
  UNIQUE KEY `mg_STORE_WEBSITE_CODE` (`code`),
  KEY `mg_STORE_WEBSITE_SORT_ORDER` (`sort_order`),
  KEY `mg_STORE_WEBSITE_DEFAULT_GROUP_ID` (`default_group_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='Websites';

--
-- Dumping data for table `mg_store_website`
--

INSERT INTO `mg_store_website` VALUES (0,'admin','Admin',0,0,0),(1,'base','Main Website',0,1,1);
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_website_after_insert` AFTER INSERT ON `mg_store_website` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (NEW.`website_id`);
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_website_after_update` AFTER UPDATE ON `mg_store_website` FOR EACH ROW BEGIN
IF (NOT(NEW.`website_id` <=> OLD.`website_id`) OR NOT(NEW.`code` <=> OLD.`code`) OR NOT(NEW.`name` <=> OLD.`name`) OR NOT(NEW.`sort_order` <=> OLD.`sort_order`) OR NOT(NEW.`default_group_id` <=> OLD.`default_group_id`) OR NOT(NEW.`is_default` <=> OLD.`is_default`)) THEN INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (NEW.`website_id`); END IF;
END */;;
DELIMITER ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`gamamojo_ei3`@`%`*/ /*!50003 TRIGGER `trg_mg_store_website_after_delete` AFTER DELETE ON `mg_store_website` FOR EACH ROW BEGIN
INSERT IGNORE INTO `mg_store_data_exporter_cl` (`entity_id`) VALUES (OLD.`website_id`);
END */;;
DELIMITER ;

--
-- Table structure for table `mg_stores_data_exporter`
--

CREATE TABLE `mg_stores_data_exporter` (
  `id` int(10) unsigned NOT NULL COMMENT 'ID',
  `feed_data` mediumtext NOT NULL COMMENT 'Feed Data',
  `modified_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modified At',
  PRIMARY KEY (`id`),
  KEY `mg_STORES_DATA_EXPORTER_MODIFIED_AT` (`modified_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Stores Feed Storage';

--
-- Dumping data for table `mg_stores_data_exporter`
--


--
-- Table structure for table `mg_stores_data_exporter_index_batches`
--

CREATE TABLE `mg_stores_data_exporter_index_batches` (
  `batch_number` int(11) NOT NULL COMMENT 'Batch Number',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website Id',
  PRIMARY KEY (`batch_number`,`website_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='mg_stores_data_exporter_index_batches';

--
-- Dumping data for table `mg_stores_data_exporter_index_batches`
--


--
-- Table structure for table `mg_stores_data_exporter_index_sequence`
--

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

--
-- Dumping data for table `mg_stores_data_exporter_index_sequence`
--


--
-- Table structure for table `mg_tax_calculation`
--

CREATE TABLE `mg_tax_calculation` (
  `tax_calculation_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Tax Calculation ID',
  `tax_calculation_rate_id` int(11) NOT NULL COMMENT 'Tax Calculation Rate ID',
  `tax_calculation_rule_id` int(11) NOT NULL COMMENT 'Tax Calculation Rule ID',
  `customer_tax_class_id` smallint(6) NOT NULL COMMENT 'Customer Tax Class ID',
  `product_tax_class_id` smallint(6) NOT NULL COMMENT 'Product Tax Class ID',
  PRIMARY KEY (`tax_calculation_id`),
  KEY `mg_TAX_CALCULATION_TAX_CALCULATION_RULE_ID` (`tax_calculation_rule_id`),
  KEY `mg_TAX_CALCULATION_CUSTOMER_TAX_CLASS_ID` (`customer_tax_class_id`),
  KEY `mg_TAX_CALCULATION_PRODUCT_TAX_CLASS_ID` (`product_tax_class_id`),
  KEY `IDX_DC62AA3A0515973AF9E40AD22777C73A` (`tax_calculation_rate_id`,`customer_tax_class_id`,`product_tax_class_id`),
  CONSTRAINT `FK_2B652BD3CC9AD34C7A2B33BAA2AB9BBB` FOREIGN KEY (`tax_calculation_rule_id`) REFERENCES `mg_tax_calculation_rule` (`tax_calculation_rule_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_469DCE2C6AFE66A67F19F89821271A06` FOREIGN KEY (`tax_calculation_rate_id`) REFERENCES `mg_tax_calculation_rate` (`tax_calculation_rate_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_TAX_CALC_CSTR_TAX_CLASS_ID_mg_TAX_CLASS_CLASS_ID` FOREIGN KEY (`customer_tax_class_id`) REFERENCES `mg_tax_class` (`class_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_TAX_CALC_PRD_TAX_CLASS_ID_mg_TAX_CLASS_CLASS_ID` FOREIGN KEY (`product_tax_class_id`) REFERENCES `mg_tax_class` (`class_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Tax Calculation';

--
-- Dumping data for table `mg_tax_calculation`
--


--
-- Table structure for table `mg_tax_calculation_rate`
--

CREATE TABLE `mg_tax_calculation_rate` (
  `tax_calculation_rate_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Tax Calculation Rate ID',
  `tax_country_id` varchar(2) NOT NULL COMMENT 'Tax Country ID',
  `tax_region_id` int(11) NOT NULL COMMENT 'Tax Region ID',
  `tax_postcode` varchar(21) DEFAULT NULL COMMENT 'Tax Postcode',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `rate` decimal(12,4) NOT NULL COMMENT 'Rate',
  `zip_is_range` smallint(6) DEFAULT NULL COMMENT 'Zip Is Range',
  `zip_from` int(10) unsigned DEFAULT NULL COMMENT 'Zip From',
  `zip_to` int(10) unsigned DEFAULT NULL COMMENT 'Zip To',
  PRIMARY KEY (`tax_calculation_rate_id`),
  KEY `mg_TAX_CALC_RATE_TAX_COUNTRY_ID_TAX_REGION_ID_TAX_POSTCODE` (`tax_country_id`,`tax_region_id`,`tax_postcode`),
  KEY `mg_TAX_CALCULATION_RATE_CODE` (`code`),
  KEY `IDX_A3AD8DCACB38995910B5FDF5D42127A2` (`tax_calculation_rate_id`,`tax_country_id`,`tax_region_id`,`zip_is_range`,`tax_postcode`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='Tax Calculation Rate';

--
-- Dumping data for table `mg_tax_calculation_rate`
--

INSERT INTO `mg_tax_calculation_rate` VALUES (1,'US',12,'*','US-CA-*-Rate 1',8.2500,NULL,NULL,NULL),(2,'US',43,'*','US-NY-*-Rate 1',8.3750,NULL,NULL,NULL);

--
-- Table structure for table `mg_tax_calculation_rate_title`
--

CREATE TABLE `mg_tax_calculation_rate_title` (
  `tax_calculation_rate_title_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Tax Calculation Rate Title ID',
  `tax_calculation_rate_id` int(11) NOT NULL COMMENT 'Tax Calculation Rate ID',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `value` varchar(255) NOT NULL COMMENT 'Value',
  PRIMARY KEY (`tax_calculation_rate_title_id`),
  KEY `mg_TAX_CALCULATION_RATE_TITLE_TAX_CALCULATION_RATE_ID_STORE_ID` (`tax_calculation_rate_id`,`store_id`),
  KEY `mg_TAX_CALCULATION_RATE_TITLE_STORE_ID` (`store_id`),
  CONSTRAINT `FK_D28111D1128C56F7BE39EF301F9F32B2` FOREIGN KEY (`tax_calculation_rate_id`) REFERENCES `mg_tax_calculation_rate` (`tax_calculation_rate_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_TAX_CALCULATION_RATE_TITLE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Tax Calculation Rate Title';

--
-- Dumping data for table `mg_tax_calculation_rate_title`
--


--
-- Table structure for table `mg_tax_calculation_rule`
--

CREATE TABLE `mg_tax_calculation_rule` (
  `tax_calculation_rule_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Tax Calculation Rule ID',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `priority` int(11) NOT NULL COMMENT 'Priority',
  `position` int(11) NOT NULL COMMENT 'Position',
  `calculate_subtotal` int(11) NOT NULL COMMENT 'Calculate off subtotal option',
  PRIMARY KEY (`tax_calculation_rule_id`),
  KEY `mg_TAX_CALCULATION_RULE_PRIORITY_POSITION` (`priority`,`position`),
  KEY `mg_TAX_CALCULATION_RULE_CODE` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Tax Calculation Rule';

--
-- Dumping data for table `mg_tax_calculation_rule`
--


--
-- Table structure for table `mg_tax_class`
--

CREATE TABLE `mg_tax_class` (
  `class_id` smallint(6) NOT NULL AUTO_INCREMENT COMMENT 'Class ID',
  `class_name` varchar(255) NOT NULL COMMENT 'Class Name',
  `class_type` varchar(8) NOT NULL DEFAULT 'CUSTOMER' COMMENT 'Class Type',
  PRIMARY KEY (`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='Tax Class';

--
-- Dumping data for table `mg_tax_class`
--

INSERT INTO `mg_tax_class` VALUES (2,'Taxable Goods','PRODUCT'),(3,'Retail Customer','CUSTOMER');

--
-- Table structure for table `mg_tax_order_aggregated_created`
--

CREATE TABLE `mg_tax_order_aggregated_created` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `percent` float DEFAULT NULL COMMENT 'Percent',
  `orders_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `tax_base_amount_sum` float DEFAULT NULL COMMENT 'Tax Base Amount Sum',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_A719D9444F7B979B92D2369CE724F9D0` (`period`,`store_id`,`code`,`percent`,`order_status`),
  KEY `mg_TAX_ORDER_AGGREGATED_CREATED_STORE_ID` (`store_id`),
  CONSTRAINT `mg_TAX_ORDER_AGGREGATED_CREATED_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Tax Order Aggregation';

--
-- Dumping data for table `mg_tax_order_aggregated_created`
--


--
-- Table structure for table `mg_tax_order_aggregated_updated`
--

CREATE TABLE `mg_tax_order_aggregated_updated` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `period` date DEFAULT NULL COMMENT 'Period',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `order_status` varchar(50) NOT NULL COMMENT 'Order Status',
  `percent` float DEFAULT NULL COMMENT 'Percent',
  `orders_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Orders Count',
  `tax_base_amount_sum` float DEFAULT NULL COMMENT 'Tax Base Amount Sum',
  PRIMARY KEY (`id`),
  UNIQUE KEY `UNQ_6C22B67A5EB5D08555BC3FA3F54DD8F3` (`period`,`store_id`,`code`,`percent`,`order_status`),
  KEY `mg_TAX_ORDER_AGGREGATED_UPDATED_STORE_ID` (`store_id`),
  CONSTRAINT `mg_TAX_ORDER_AGGREGATED_UPDATED_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Tax Order Aggregated Updated';

--
-- Dumping data for table `mg_tax_order_aggregated_updated`
--


--
-- Table structure for table `mg_tfa_country_codes`
--

CREATE TABLE `mg_tfa_country_codes` (
  `country_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'TFA admin user ID',
  `code` varchar(2) NOT NULL COMMENT 'Country code',
  `name` varchar(255) NOT NULL COMMENT 'Country name',
  `dial_code` varchar(255) NOT NULL COMMENT 'Prefix',
  PRIMARY KEY (`country_id`),
  KEY `mg_TFA_COUNTRY_CODES_CODE` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=242 DEFAULT CHARSET=utf8mb4 COMMENT='tfa_country_codes';

--
-- Dumping data for table `mg_tfa_country_codes`
--

INSERT INTO `mg_tfa_country_codes` VALUES (1,'IL','Israel','+972'),(2,'AF','Afghanistan','+93'),(3,'AL','Albania','+355'),(4,'DZ','Algeria','+213'),(5,'AS','AmericanSamoa','+1 684'),(6,'AD','Andorra','+376'),(7,'AO','Angola','+244'),(8,'AI','Anguilla','+1 264'),(9,'AG','Antigua and Barbuda','+1268'),(10,'AR','Argentina','+54'),(11,'AM','Armenia','+374'),(12,'AW','Aruba','+297'),(13,'AU','Australia','+61'),(14,'AT','Austria','+43'),(15,'AZ','Azerbaijan','+994'),(16,'BS','Bahamas','+1 242'),(17,'BH','Bahrain','+973'),(18,'BD','Bangladesh','+880'),(19,'BB','Barbados','+1 246'),(20,'BY','Belarus','+375'),(21,'BE','Belgium','+32'),(22,'BZ','Belize','+501'),(23,'BJ','Benin','+229'),(24,'BM','Bermuda','+1 441'),(25,'BT','Bhutan','+975'),(26,'BA','Bosnia and Herzegovina','+387'),(27,'BW','Botswana','+267'),(28,'BR','Brazil','+55'),(29,'IO','British Indian Ocean Territory','+246'),(30,'BG','Bulgaria','+359'),(31,'BF','Burkina Faso','+226'),(32,'BI','Burundi','+257'),(33,'KH','Cambodia','+855'),(34,'CM','Cameroon','+237'),(35,'CA','Canada','+1'),(36,'CV','Cape Verde','+238'),(37,'KY','Cayman Islands','+ 345'),(38,'CF','Central African Republic','+236'),(39,'TD','Chad','+235'),(40,'CL','Chile','+56'),(41,'CN','China','+86'),(42,'CX','Christmas Island','+61'),(43,'CO','Colombia','+57'),(44,'KM','Comoros','+269'),(45,'CG','Congo','+242'),(46,'CK','Cook Islands','+682'),(47,'CR','Costa Rica','+506'),(48,'HR','Croatia','+385'),(49,'CU','Cuba','+53'),(50,'CY','Cyprus','+537'),(51,'CZ','Czech Republic','+420'),(52,'DK','Denmark','+45'),(53,'DJ','Djibouti','+253'),(54,'DM','Dominica','+1 767'),(55,'DO','Dominican Republic','+1 849'),(56,'EC','Ecuador','+593'),(57,'EG','Egypt','+20'),(58,'SV','El Salvador','+503'),(59,'GQ','Equatorial Guinea','+240'),(60,'ER','Eritrea','+291'),(61,'EE','Estonia','+372'),(62,'ET','Ethiopia','+251'),(63,'FO','Faroe Islands','+298'),(64,'FJ','Fiji','+679'),(65,'FI','Finland','+358'),(66,'FR','France','+33'),(67,'GF','French Guiana','+594'),(68,'PF','French Polynesia','+689'),(69,'GA','Gabon','+241'),(70,'GM','Gambia','+220'),(71,'GE','Georgia','+995'),(72,'DE','Germany','+49'),(73,'GH','Ghana','+233'),(74,'GI','Gibraltar','+350'),(75,'GR','Greece','+30'),(76,'GL','Greenland','+299'),(77,'GD','Grenada','+1 473'),(78,'GP','Guadeloupe','+590'),(79,'GU','Guam','+1 671'),(80,'GT','Guatemala','+502'),(81,'GN','Guinea','+224'),(82,'GW','Guinea-Bissau','+245'),(83,'GY','Guyana','+595'),(84,'HT','Haiti','+509'),(85,'HN','Honduras','+504'),(86,'HU','Hungary','+36'),(87,'IS','Iceland','+354'),(88,'IN','India','+91'),(89,'ID','Indonesia','+62'),(90,'IQ','Iraq','+964'),(91,'IE','Ireland','+353'),(92,'IL','Israel','+972'),(93,'IT','Italy','+39'),(94,'JM','Jamaica','+1 876'),(95,'JP','Japan','+81'),(96,'JO','Jordan','+962'),(97,'KZ','Kazakhstan','+7 7'),(98,'KE','Kenya','+254'),(99,'KI','Kiribati','+686'),(100,'KW','Kuwait','+965'),(101,'KG','Kyrgyzstan','+996'),(102,'LV','Latvia','+371'),(103,'LB','Lebanon','+961'),(104,'LS','Lesotho','+266'),(105,'LR','Liberia','+231'),(106,'LI','Liechtenstein','+423'),(107,'LT','Lithuania','+370'),(108,'LU','Luxembourg','+352'),(109,'MG','Madagascar','+261'),(110,'MW','Malawi','+265'),(111,'MY','Malaysia','+60'),(112,'MV','Maldives','+960'),(113,'ML','Mali','+223'),(114,'MT','Malta','+356'),(115,'MH','Marshall Islands','+692'),(116,'MQ','Martinique','+596'),(117,'MR','Mauritania','+222'),(118,'MU','Mauritius','+230'),(119,'YT','Mayotte','+262'),(120,'MX','Mexico','+52'),(121,'MC','Monaco','+377'),(122,'MN','Mongolia','+976'),(123,'ME','Montenegro','+382'),(124,'MS','Montserrat','+1664'),(125,'MA','Morocco','+212'),(126,'MM','Myanmar','+95'),(127,'NA','Namibia','+264'),(128,'NR','Nauru','+674'),(129,'NP','Nepal','+977'),(130,'NL','Netherlands','+31'),(131,'AN','Netherlands Antilles','+599'),(132,'NC','New Caledonia','+687'),(133,'NZ','New Zealand','+64'),(134,'NI','Nicaragua','+505'),(135,'NE','Niger','+227'),(136,'NG','Nigeria','+234'),(137,'NU','Niue','+683'),(138,'NF','Norfolk Island','+672'),(139,'MP','Northern Mariana Islands','+1 670'),(140,'NO','Norway','+47'),(141,'OM','Oman','+968'),(142,'PK','Pakistan','+92'),(143,'PW','Palau','+680'),(144,'PA','Panama','+507'),(145,'PG','Papua New Guinea','+675'),(146,'PY','Paraguay','+595'),(147,'PE','Peru','+51'),(148,'PH','Philippines','+63'),(149,'PL','Poland','+48'),(150,'PT','Portugal','+351'),(151,'PR','Puerto Rico','+1 939'),(152,'QA','Qatar','+974'),(153,'RO','Romania','+40'),(154,'RW','Rwanda','+250'),(155,'WS','Samoa','+685'),(156,'SM','San Marino','+378'),(157,'SA','Saudi Arabia','+966'),(158,'SN','Senegal','+221'),(159,'RS','Serbia','+381'),(160,'SC','Seychelles','+248'),(161,'SL','Sierra Leone','+232'),(162,'SG','Singapore','+65'),(163,'SK','Slovakia','+421'),(164,'SI','Slovenia','+386'),(165,'SB','Solomon Islands','+677'),(166,'ZA','South Africa','+27'),(167,'GS','South Georgia and the South Sandwich Islands','+500'),(168,'ES','Spain','+34'),(169,'LK','Sri Lanka','+94'),(170,'SD','Sudan','+249'),(171,'SR','Suriname','+597'),(172,'SZ','Swaziland','+268'),(173,'SE','Sweden','+46'),(174,'CH','Switzerland','+41'),(175,'TJ','Tajikistan','+992'),(176,'TH','Thailand','+66'),(177,'TG','Togo','+228'),(178,'TK','Tokelau','+690'),(179,'TO','Tonga','+676'),(180,'TT','Trinidad and Tobago','+1 868'),(181,'TN','Tunisia','+216'),(182,'TR','Turkey','+90'),(183,'TM','Turkmenistan','+993'),(184,'TC','Turks and Caicos Islands','+1 649'),(185,'TV','Tuvalu','+688'),(186,'UG','Uganda','+256'),(187,'UA','Ukraine','+380'),(188,'AE','United Arab Emirates','+971'),(189,'GB','United Kingdom','+44'),(190,'US','United States','+1'),(191,'UY','Uruguay','+598'),(192,'UZ','Uzbekistan','+998'),(193,'VU','Vanuatu','+678'),(194,'WF','Wallis and Futuna','+681'),(195,'YE','Yemen','+967'),(196,'ZM','Zambia','+260'),(197,'ZW','Zimbabwe','+263'),(198,'AX','land Islands',''),(199,'BO','Bolivia, Plurinational State of','+591'),(200,'BN','Brunei Darussalam','+673'),(201,'CC','Cocos (Keeling) Islands','+61'),(202,'CD','Congo, The Democratic Republic of the','+243'),(203,'CI','Cote d\'Ivoire','+225'),(204,'FK','Falkland Islands (Malvinas)','+500'),(205,'GG','Guernsey','+44'),(206,'VA','Holy See (Vatican City State)','+379'),(207,'HK','Hong Kong','+852'),(208,'IR','Iran, Islamic Republic of','+98'),(209,'IM','Isle of Man','+44'),(210,'JE','Jersey','+44'),(211,'KP','Korea, Democratic People\'s Republic of','+850'),(212,'KR','Korea, Republic of','+82'),(213,'LA','Lao People\'s Democratic Republic','+856'),(214,'LY','Libyan Arab Jamahiriya','+218'),(215,'MO','Macao','+853'),(216,'MK','Macedonia, The Former Yugoslav Republic of','+389'),(217,'FM','Micronesia, Federated States of','+691'),(218,'MD','Moldova, Republic of','+373'),(219,'MZ','Mozambique','+258'),(220,'PS','Palestinian Territory, Occupied','+970'),(221,'PN','Pitcairn','+872'),(222,'RE','Réunion','+262'),(223,'RU','Russia','+7'),(224,'BL','Saint Barthélemy','+590'),(225,'SH','Saint Helena, Ascension and Tristan Da Cunha','+290'),(226,'KN','Saint Kitts and Nevis','+1 869'),(227,'LC','Saint Lucia','+1 758'),(228,'MF','Saint Martin','+590'),(229,'PM','Saint Pierre and Miquelon','+508'),(230,'VC','Saint Vincent and the Grenadines','+1 784'),(231,'ST','Sao Tome and Principe','+239'),(232,'SO','Somalia','+252'),(233,'SJ','Svalbard and Jan Mayen','+47'),(234,'SY','Syrian Arab Republic','+963'),(235,'TW','Taiwan, Province of China','+886'),(236,'TZ','Tanzania, United Republic of','+255'),(237,'TL','Timor-Leste','+670'),(238,'VE','Venezuela, Bolivarian Republic of','+58'),(239,'VN','Viet Nam','+84'),(240,'VG','Virgin Islands, British','+1 284'),(241,'VI','Virgin Islands, U.S.','+1 340');

--
-- Table structure for table `mg_tfa_user_config`
--

CREATE TABLE `mg_tfa_user_config` (
  `config_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'TFA admin user ID',
  `user_id` int(10) unsigned NOT NULL COMMENT 'User ID',
  `encoded_providers` text COMMENT 'Encoded providers list',
  `encoded_config` text COMMENT 'Encoded providers configuration',
  `default_provider` varchar(255) DEFAULT NULL COMMENT 'Default provider',
  PRIMARY KEY (`config_id`),
  KEY `mg_TFA_USER_CONFIG_USER_ID_mg_ADMIN_USER_USER_ID` (`user_id`),
  CONSTRAINT `mg_TFA_USER_CONFIG_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='tfa_user_config';

--
-- Dumping data for table `mg_tfa_user_config`
--


--
-- Table structure for table `mg_theme`
--

CREATE TABLE `mg_theme` (
  `theme_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Theme identifier',
  `parent_id` int(11) DEFAULT NULL COMMENT 'Parent ID',
  `theme_path` varchar(255) DEFAULT NULL COMMENT 'Theme Path',
  `theme_title` varchar(255) NOT NULL COMMENT 'Theme Title',
  `preview_image` varchar(255) DEFAULT NULL COMMENT 'Preview Image',
  `is_featured` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Is Theme Featured',
  `area` varchar(255) NOT NULL COMMENT 'Theme Area',
  `type` smallint(6) NOT NULL COMMENT 'Theme type: 0:physical, 1:virtual, 2:staging',
  `code` text COMMENT 'Full theme code, including package',
  PRIMARY KEY (`theme_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='Core theme';

--
-- Dumping data for table `mg_theme`
--

INSERT INTO `mg_theme` VALUES (1,NULL,'Magento/blank','Magento Blank','preview_image_68ef7bf95ffb5.jpeg',0,'frontend',0,'Magento/blank'),(2,NULL,'Magento/backend','Magento 2 backend',NULL,0,'adminhtml',0,'Magento/backend'),(3,1,'Magento/luma','Magento Luma','preview_image_68ef7bf97ae86.jpeg',0,'frontend',0,'Magento/luma'),(4,3,'Gama/GamaHome','Gama Home',NULL,0,'frontend',0,'Gama/GamaHome'),(5,1,'Sm/themecore','Sm Theme Core','preview_image_6977e8a2039d8.png',0,'frontend',0,'Sm/themecore'),(6,5,'Sm/market','Sm Market','preview_image_6977e8a238cfd.png',0,'frontend',0,'Sm/market'),(7,6,'Sm/market_2','Sm Market 2','preview_image_6977e8a2734d9.png',0,'frontend',0,'Sm/market_2'),(8,6,'Sm/market_4','Sm Market 4','preview_image_6977e8a2af768.png',0,'frontend',0,'Sm/market_4'),(9,6,'Sm/market_3','Sm Market 3','preview_image_6977e8a2ea7ea.png',0,'frontend',0,'Sm/market_3'),(10,6,'Sm/smtheme_mobile','Sm Market Mobile','preview_image_6977e8a323545.png',0,'frontend',0,'Sm/smtheme_mobile');

--
-- Table structure for table `mg_theme_file`
--

CREATE TABLE `mg_theme_file` (
  `theme_files_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Theme files identifier',
  `theme_id` int(10) unsigned NOT NULL COMMENT 'Theme ID',
  `file_path` varchar(255) DEFAULT NULL COMMENT 'Relative path to file',
  `file_type` varchar(32) NOT NULL COMMENT 'File Type',
  `content` longtext NOT NULL COMMENT 'File Content',
  `sort_order` smallint(6) NOT NULL DEFAULT '0' COMMENT 'Sort Order',
  `is_temporary` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Is Temporary File',
  PRIMARY KEY (`theme_files_id`),
  KEY `mg_THEME_FILE_THEME_ID_mg_THEME_THEME_ID` (`theme_id`),
  CONSTRAINT `mg_THEME_FILE_THEME_ID_mg_THEME_THEME_ID` FOREIGN KEY (`theme_id`) REFERENCES `mg_theme` (`theme_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Core theme files';

--
-- Dumping data for table `mg_theme_file`
--


--
-- Table structure for table `mg_translation`
--

CREATE TABLE `mg_translation` (
  `key_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Key ID of Translation',
  `string` varchar(255) NOT NULL DEFAULT 'Translate String' COMMENT 'Translation String',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `translate` varchar(255) DEFAULT NULL COMMENT 'Translate',
  `locale` varchar(20) NOT NULL DEFAULT 'en_US' COMMENT 'Locale',
  `crc_string` bigint(20) NOT NULL DEFAULT '1591228201' COMMENT 'Translation String CRC32 Hash',
  PRIMARY KEY (`key_id`),
  UNIQUE KEY `mg_TRANSLATION_STORE_ID_LOCALE_CRC_STRING_STRING` (`store_id`,`locale`,`crc_string`,`string`),
  CONSTRAINT `mg_TRANSLATION_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Translations';

--
-- Dumping data for table `mg_translation`
--


--
-- Table structure for table `mg_ui_bookmark`
--

CREATE TABLE `mg_ui_bookmark` (
  `bookmark_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Bookmark identifier',
  `user_id` int(10) unsigned NOT NULL COMMENT 'User ID',
  `namespace` varchar(255) NOT NULL COMMENT 'Bookmark namespace',
  `identifier` varchar(255) NOT NULL COMMENT 'Bookmark Identifier',
  `current` smallint(6) NOT NULL COMMENT 'Mark current bookmark per user and identifier',
  `title` varchar(255) DEFAULT NULL COMMENT 'Bookmark title',
  `config` longtext COMMENT 'Bookmark config',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Bookmark created at',
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Bookmark updated at',
  PRIMARY KEY (`bookmark_id`),
  KEY `mg_UI_BOOKMARK_USER_ID_NAMESPACE_IDENTIFIER` (`user_id`,`namespace`,`identifier`),
  CONSTRAINT `mg_UI_BOOKMARK_USER_ID_mg_ADMIN_USER_USER_ID` FOREIGN KEY (`user_id`) REFERENCES `mg_admin_user` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COMMENT='Bookmark';

--
-- Dumping data for table `mg_ui_bookmark`
--

INSERT INTO `mg_ui_bookmark` VALUES (1,1,'product_listing','default',1,'Default View','{\"views\":{\"default\":{\"label\":\"Default View\",\"index\":\"default\",\"editable\":false,\"data\":{\"filters\":{\"applied\":{\"placeholder\":true}},\"columns\":{\"entity_id\":{\"visible\":true,\"sorting\":\"asc\"},\"name\":{\"visible\":true,\"sorting\":false},\"sku\":{\"visible\":true,\"sorting\":false},\"price\":{\"visible\":true,\"sorting\":false},\"qty\":{\"visible\":true,\"sorting\":false},\"short_description\":{\"visible\":false,\"sorting\":false},\"special_price\":{\"visible\":false,\"sorting\":false},\"cost\":{\"visible\":false,\"sorting\":false},\"weight\":{\"visible\":false,\"sorting\":false},\"meta_title\":{\"visible\":false,\"sorting\":false},\"meta_keyword\":{\"visible\":false,\"sorting\":false},\"meta_description\":{\"visible\":false,\"sorting\":false},\"url_key\":{\"visible\":false,\"sorting\":false},\"msrp\":{\"visible\":false,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false},\"ids\":{\"visible\":true,\"sorting\":false},\"type_id\":{\"visible\":true,\"sorting\":false},\"attribute_set_id\":{\"visible\":true,\"sorting\":false},\"visibility\":{\"visible\":true,\"sorting\":false},\"status\":{\"visible\":true,\"sorting\":false},\"manufacturer\":{\"visible\":false,\"sorting\":false},\"color\":{\"visible\":false,\"sorting\":false},\"custom_design\":{\"visible\":false,\"sorting\":false},\"page_layout\":{\"visible\":false,\"sorting\":false},\"country_of_manufacture\":{\"visible\":false,\"sorting\":false},\"custom_layout\":{\"visible\":false,\"sorting\":false},\"gift_message_available\":{\"visible\":false,\"sorting\":false},\"tax_class_id\":{\"visible\":false,\"sorting\":false},\"salable_quantity\":{\"visible\":true,\"sorting\":false},\"thumbnail\":{\"visible\":true,\"sorting\":false},\"updated_at\":{\"visible\":true,\"sorting\":false},\"special_from_date\":{\"visible\":false,\"sorting\":false},\"special_to_date\":{\"visible\":false,\"sorting\":false},\"news_from_date\":{\"visible\":false,\"sorting\":false},\"news_to_date\":{\"visible\":false,\"sorting\":false},\"custom_design_from\":{\"visible\":false,\"sorting\":false},\"custom_design_to\":{\"visible\":false,\"sorting\":false},\"marca\":{\"visible\":false,\"sorting\":false}},\"search\":{\"value\":\"\"},\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20},\"displayMode\":\"grid\",\"positions\":{\"ids\":0,\"entity_id\":1,\"thumbnail\":2,\"name\":3,\"type_id\":4,\"attribute_set_id\":5,\"sku\":6,\"price\":7,\"qty\":8,\"salable_quantity\":9,\"visibility\":10,\"status\":11,\"short_description\":12,\"special_price\":13,\"special_from_date\":14,\"special_to_date\":15,\"cost\":16,\"weight\":17,\"manufacturer\":18,\"meta_title\":19,\"meta_keyword\":20,\"meta_description\":21,\"color\":22,\"news_from_date\":23,\"news_to_date\":24,\"custom_design\":25,\"custom_design_from\":26,\"custom_design_to\":27,\"page_layout\":28,\"country_of_manufacture\":29,\"custom_layout\":30,\"url_key\":31,\"msrp\":32,\"gift_message_available\":33,\"tax_class_id\":34,\"updated_at\":35,\"actions\":36,\"marca\":37}},\"value\":\"Default View\"}}}','2025-11-28 18:36:30','2025-12-01 00:00:33'),(2,1,'product_listing','current',0,NULL,'{\"current\":{\"filters\":{\"applied\":{\"placeholder\":true}},\"columns\":{\"entity_id\":{\"visible\":true,\"sorting\":\"asc\"},\"name\":{\"visible\":true,\"sorting\":false},\"sku\":{\"visible\":true,\"sorting\":false},\"price\":{\"visible\":true,\"sorting\":false},\"qty\":{\"visible\":true,\"sorting\":false},\"short_description\":{\"visible\":false,\"sorting\":false},\"special_price\":{\"visible\":false,\"sorting\":false},\"cost\":{\"visible\":false,\"sorting\":false},\"weight\":{\"visible\":false,\"sorting\":false},\"meta_title\":{\"visible\":false,\"sorting\":false},\"meta_keyword\":{\"visible\":false,\"sorting\":false},\"meta_description\":{\"visible\":false,\"sorting\":false},\"url_key\":{\"visible\":false,\"sorting\":false},\"msrp\":{\"visible\":false,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false},\"ids\":{\"visible\":true,\"sorting\":false},\"type_id\":{\"visible\":true,\"sorting\":false},\"attribute_set_id\":{\"visible\":true,\"sorting\":false},\"visibility\":{\"visible\":true,\"sorting\":false},\"status\":{\"visible\":true,\"sorting\":false},\"manufacturer\":{\"visible\":false,\"sorting\":false},\"color\":{\"visible\":false,\"sorting\":false},\"custom_design\":{\"visible\":false,\"sorting\":false},\"page_layout\":{\"visible\":false,\"sorting\":false},\"country_of_manufacture\":{\"visible\":false,\"sorting\":false},\"custom_layout\":{\"visible\":false,\"sorting\":false},\"gift_message_available\":{\"visible\":false,\"sorting\":false},\"tax_class_id\":{\"visible\":false,\"sorting\":false},\"salable_quantity\":{\"visible\":true,\"sorting\":false},\"thumbnail\":{\"visible\":true,\"sorting\":false},\"updated_at\":{\"visible\":true,\"sorting\":false},\"special_from_date\":{\"visible\":false,\"sorting\":false},\"special_to_date\":{\"visible\":false,\"sorting\":false},\"news_from_date\":{\"visible\":false,\"sorting\":false},\"news_to_date\":{\"visible\":false,\"sorting\":false},\"custom_design_from\":{\"visible\":false,\"sorting\":false},\"custom_design_to\":{\"visible\":false,\"sorting\":false},\"marca\":{\"visible\":false,\"sorting\":false}},\"search\":{\"value\":\"\"},\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20},\"displayMode\":\"grid\",\"positions\":{\"ids\":0,\"entity_id\":1,\"thumbnail\":2,\"name\":3,\"type_id\":4,\"attribute_set_id\":5,\"sku\":6,\"price\":7,\"qty\":8,\"salable_quantity\":9,\"visibility\":10,\"status\":11,\"short_description\":12,\"special_price\":13,\"special_from_date\":14,\"special_to_date\":15,\"cost\":16,\"weight\":17,\"manufacturer\":18,\"meta_title\":19,\"meta_keyword\":20,\"meta_description\":21,\"color\":22,\"news_from_date\":23,\"news_to_date\":24,\"custom_design\":25,\"custom_design_from\":26,\"custom_design_to\":27,\"page_layout\":28,\"country_of_manufacture\":29,\"custom_layout\":30,\"url_key\":31,\"msrp\":32,\"gift_message_available\":33,\"tax_class_id\":34,\"updated_at\":35,\"actions\":36,\"marca\":37}}}','2025-11-28 18:36:32','2025-12-01 00:00:33'),(3,1,'cms_page_listing','default',1,'Default View','{\"views\":{\"default\":{\"label\":\"Default View\",\"index\":\"default\",\"editable\":false,\"data\":{\"columns\":{\"page_id\":{\"visible\":true,\"sorting\":\"asc\"},\"title\":{\"visible\":true,\"sorting\":false},\"identifier\":{\"visible\":true,\"sorting\":false},\"meta_title\":{\"visible\":false,\"sorting\":false},\"meta_keywords\":{\"visible\":false,\"sorting\":false},\"meta_description\":{\"visible\":false,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false},\"ids\":{\"visible\":true,\"sorting\":false},\"page_layout\":{\"visible\":true,\"sorting\":false},\"is_active\":{\"visible\":true,\"sorting\":false},\"custom_theme\":{\"visible\":false,\"sorting\":false},\"custom_root_template\":{\"visible\":false,\"sorting\":false},\"creation_time\":{\"visible\":true,\"sorting\":false},\"update_time\":{\"visible\":true,\"sorting\":false},\"custom_theme_from\":{\"visible\":false,\"sorting\":false},\"custom_theme_to\":{\"visible\":false,\"sorting\":false}},\"filters\":{\"applied\":{\"placeholder\":true}},\"search\":{\"value\":\"\"},\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20},\"displayMode\":\"grid\",\"positions\":{\"ids\":0,\"page_id\":1,\"title\":2,\"identifier\":3,\"page_layout\":4,\"is_active\":5,\"creation_time\":6,\"update_time\":7,\"custom_theme_from\":8,\"custom_theme_to\":9,\"custom_theme\":10,\"custom_root_template\":11,\"meta_title\":12,\"meta_keywords\":13,\"meta_description\":14,\"actions\":15}},\"value\":\"Default View\"}}}','2025-11-28 18:44:34','2025-11-28 18:44:34'),(4,1,'cms_page_listing','current',0,NULL,'{\"current\":{\"columns\":{\"page_id\":{\"visible\":true,\"sorting\":\"asc\"},\"title\":{\"visible\":true,\"sorting\":false},\"identifier\":{\"visible\":true,\"sorting\":false},\"meta_title\":{\"visible\":false,\"sorting\":false},\"meta_keywords\":{\"visible\":false,\"sorting\":false},\"meta_description\":{\"visible\":false,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false},\"ids\":{\"visible\":true,\"sorting\":false},\"page_layout\":{\"visible\":true,\"sorting\":false},\"is_active\":{\"visible\":true,\"sorting\":false},\"custom_theme\":{\"visible\":false,\"sorting\":false},\"custom_root_template\":{\"visible\":false,\"sorting\":false},\"creation_time\":{\"visible\":true,\"sorting\":false},\"update_time\":{\"visible\":true,\"sorting\":false},\"custom_theme_from\":{\"visible\":false,\"sorting\":false},\"custom_theme_to\":{\"visible\":false,\"sorting\":false}},\"filters\":{\"applied\":{\"placeholder\":true}},\"search\":{\"value\":\"\"},\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20},\"displayMode\":\"grid\",\"positions\":{\"ids\":0,\"page_id\":1,\"title\":2,\"identifier\":3,\"page_layout\":4,\"is_active\":5,\"creation_time\":6,\"update_time\":7,\"custom_theme_from\":8,\"custom_theme_to\":9,\"custom_theme\":10,\"custom_root_template\":11,\"meta_title\":12,\"meta_keywords\":13,\"meta_description\":14,\"actions\":15}}}','2025-11-28 18:44:35','2025-11-28 18:44:35'),(5,1,'media_gallery_listing','default',1,'Default View','{\"views\":{\"default\":{\"label\":\"Default View\",\"index\":\"default\",\"editable\":false,\"data\":{\"search\":{\"value\":\"\"},\"filters\":{\"applied\":{\"placeholder\":true}},\"paging\":{\"pageSize\":\"32\",\"current\":1,\"options\":{\"32\":{\"value\":32,\"label\":\"32\"},\"48\":{\"value\":48,\"label\":\"48\"},\"64\":{\"value\":64,\"label\":\"64\"}},\"value\":\"32\"},\"columns\":{\"newest_first\":{\"visible\":false,\"sorting\":false},\"oldest_first\":{\"visible\":false,\"sorting\":false},\"created_at\":{\"visible\":false,\"sorting\":false},\"path\":{\"visible\":false,\"sorting\":false},\"directory_desc\":{\"visible\":false,\"sorting\":false},\"directory_asc\":{\"visible\":false,\"sorting\":false},\"title\":{\"visible\":false,\"sorting\":false},\"name_az\":{\"visible\":false,\"sorting\":false},\"name_za\":{\"visible\":false,\"sorting\":false},\"source\":{\"visible\":false,\"sorting\":false},\"overlay\":{\"visible\":true,\"sorting\":false},\"thumbnail_url\":{\"visible\":true,\"sorting\":false}},\"displayMode\":\"grid\",\"positions\":{\"source\":0,\"overlay\":1,\"thumbnail_url\":2,\"newest_first\":3,\"oldest_first\":4,\"created_at\":5,\"path\":6,\"directory_desc\":7,\"directory_asc\":8,\"title\":9,\"name_az\":10,\"name_za\":11}},\"value\":\"Default View\"}}}','2025-11-28 19:32:36','2025-11-28 19:32:36'),(6,1,'adobe_stock_images_listing','default',1,'Default View','{\"views\":{\"default\":{\"label\":\"Default View\",\"index\":\"default\",\"editable\":false,\"data\":{\"search\":{\"value\":\"\"},\"filters\":{\"applied\":{\"placeholder\":true}},\"paging\":{\"pageSize\":32,\"current\":1,\"value\":32},\"columns\":{\"relevance\":{\"visible\":false,\"sorting\":false},\"creation\":{\"visible\":false,\"sorting\":false},\"popularity\":{\"visible\":false,\"sorting\":false},\"nb_downloads\":{\"visible\":false,\"sorting\":false},\"undiscovered\":{\"visible\":false,\"sorting\":false},\"thumbnail_url\":{\"visible\":true,\"sorting\":false},\"preview\":{\"visible\":true,\"sorting\":false,\"lastOpenedImage\":false},\"overlay\":{\"visible\":true,\"sorting\":false}},\"displayMode\":\"grid\",\"positions\":{\"overlay\":0,\"thumbnail_url\":1,\"preview\":2,\"relevance\":3,\"creation\":4,\"popularity\":5,\"nb_downloads\":6,\"undiscovered\":7}},\"value\":\"Default View\"}}}','2025-11-28 19:32:36','2025-11-28 19:32:36'),(7,1,'adobe_stock_images_listing','current',0,NULL,'{\"current\":{\"search\":{\"value\":\"\"},\"filters\":{\"applied\":{\"placeholder\":true}},\"paging\":{\"pageSize\":32,\"current\":1,\"value\":32},\"columns\":{\"relevance\":{\"visible\":false,\"sorting\":false},\"creation\":{\"visible\":false,\"sorting\":false},\"popularity\":{\"visible\":false,\"sorting\":false},\"nb_downloads\":{\"visible\":false,\"sorting\":false},\"undiscovered\":{\"visible\":false,\"sorting\":false},\"thumbnail_url\":{\"visible\":true,\"sorting\":false},\"preview\":{\"visible\":true,\"sorting\":false,\"lastOpenedImage\":false},\"overlay\":{\"visible\":true,\"sorting\":false}},\"displayMode\":\"grid\",\"positions\":{\"overlay\":0,\"thumbnail_url\":1,\"preview\":2,\"relevance\":3,\"creation\":4,\"popularity\":5,\"nb_downloads\":6,\"undiscovered\":7}}}','2025-11-28 19:32:37','2025-11-28 19:32:37'),(8,1,'media_gallery_listing','current',0,NULL,'{\"current\":{\"search\":{\"value\":\"\"},\"filters\":{\"applied\":{\"placeholder\":true,\"path\":\"wysiwyg/sliders\"}},\"paging\":{\"pageSize\":\"32\",\"current\":1,\"options\":{\"32\":{\"value\":32,\"label\":\"32\"},\"48\":{\"value\":48,\"label\":\"48\"},\"64\":{\"value\":64,\"label\":\"64\"}},\"value\":\"32\"},\"columns\":{\"newest_first\":{\"visible\":false,\"sorting\":false},\"oldest_first\":{\"visible\":false,\"sorting\":false},\"created_at\":{\"visible\":false,\"sorting\":false},\"path\":{\"visible\":false,\"sorting\":false},\"directory_desc\":{\"visible\":false,\"sorting\":false},\"directory_asc\":{\"visible\":false,\"sorting\":false},\"title\":{\"visible\":false,\"sorting\":false},\"name_az\":{\"visible\":false,\"sorting\":false},\"name_za\":{\"visible\":false,\"sorting\":false},\"source\":{\"visible\":false,\"sorting\":false},\"overlay\":{\"visible\":true,\"sorting\":false},\"thumbnail_url\":{\"visible\":true,\"sorting\":false}},\"displayMode\":\"grid\",\"positions\":{\"source\":0,\"overlay\":1,\"thumbnail_url\":2,\"newest_first\":3,\"oldest_first\":4,\"created_at\":5,\"path\":6,\"directory_desc\":7,\"directory_asc\":8,\"title\":9,\"name_az\":10,\"name_za\":11}}}','2025-11-28 19:32:39','2025-11-28 19:39:32'),(9,1,'url_rewrite_listing','default',1,'Default View','{\"views\":{\"default\":{\"label\":\"Default View\",\"index\":\"default\",\"editable\":false,\"data\":{\"filters\":{\"applied\":{\"placeholder\":true}},\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20},\"columns\":{\"url_rewrite_id\":{\"visible\":true,\"sorting\":\"desc\"},\"request_path\":{\"visible\":true,\"sorting\":false},\"target_path\":{\"visible\":true,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false},\"ids\":{\"visible\":true,\"sorting\":false},\"redirect_type\":{\"visible\":true,\"sorting\":false}},\"displayMode\":\"grid\",\"positions\":{\"ids\":0,\"url_rewrite_id\":1,\"request_path\":2,\"target_path\":3,\"redirect_type\":4,\"actions\":5}},\"value\":\"Default View\"}}}','2025-11-30 23:27:29','2025-11-30 23:27:29'),(10,1,'url_rewrite_listing','current',0,NULL,'{\"current\":{\"filters\":{\"applied\":{\"placeholder\":true}},\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20},\"columns\":{\"url_rewrite_id\":{\"visible\":true,\"sorting\":\"desc\"},\"request_path\":{\"visible\":true,\"sorting\":false},\"target_path\":{\"visible\":true,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false},\"ids\":{\"visible\":true,\"sorting\":false},\"redirect_type\":{\"visible\":true,\"sorting\":false}},\"displayMode\":\"grid\",\"positions\":{\"ids\":0,\"url_rewrite_id\":1,\"request_path\":2,\"target_path\":3,\"redirect_type\":4,\"actions\":5}}}','2025-11-30 23:27:30','2025-11-30 23:27:30'),(11,1,'product_attributes_grid','default',1,'Default View','{\"views\":{\"default\":{\"label\":\"Default View\",\"index\":\"default\",\"editable\":false,\"data\":{\"columns\":{\"ids\":{\"visible\":true,\"sorting\":false},\"is_required\":{\"visible\":true,\"sorting\":false},\"is_user_defined\":{\"visible\":true,\"sorting\":false},\"is_visible\":{\"visible\":true,\"sorting\":false},\"is_global\":{\"visible\":true,\"sorting\":false},\"is_searchable\":{\"visible\":true,\"sorting\":false},\"is_comparable\":{\"visible\":true,\"sorting\":false},\"is_filterable\":{\"visible\":true,\"sorting\":false},\"attribute_code\":{\"visible\":true,\"sorting\":\"asc\"},\"frontend_label\":{\"visible\":true,\"sorting\":false}},\"positions\":{\"ids\":0,\"attribute_code\":1,\"frontend_label\":2,\"is_required\":3,\"is_user_defined\":4,\"is_visible\":5,\"is_global\":6,\"is_searchable\":7,\"is_comparable\":8,\"is_filterable\":9},\"displayMode\":\"grid\",\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20}},\"value\":\"Default View\"}}}','2025-11-30 23:52:43','2025-11-30 23:52:43'),(12,1,'product_attributes_grid','current',0,NULL,'{\"current\":{\"columns\":{\"ids\":{\"visible\":true,\"sorting\":false},\"is_required\":{\"visible\":true,\"sorting\":false},\"is_user_defined\":{\"visible\":true,\"sorting\":false},\"is_visible\":{\"visible\":true,\"sorting\":false},\"is_global\":{\"visible\":true,\"sorting\":false},\"is_searchable\":{\"visible\":true,\"sorting\":false},\"is_comparable\":{\"visible\":true,\"sorting\":false},\"is_filterable\":{\"visible\":true,\"sorting\":false},\"attribute_code\":{\"visible\":true,\"sorting\":\"asc\"},\"frontend_label\":{\"visible\":true,\"sorting\":false}},\"positions\":{\"ids\":0,\"attribute_code\":1,\"frontend_label\":2,\"is_required\":3,\"is_user_defined\":4,\"is_visible\":5,\"is_global\":6,\"is_searchable\":7,\"is_comparable\":8,\"is_filterable\":9},\"displayMode\":\"grid\",\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20}}}','2025-11-30 23:52:45','2025-11-30 23:52:45'),(13,1,'design_config_listing','default',1,'Default View','{\"views\":{\"default\":{\"label\":\"Default View\",\"index\":\"default\",\"editable\":false,\"data\":{\"filters\":{\"applied\":{\"placeholder\":true}},\"displayMode\":\"grid\",\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20},\"positions\":{\"default\":0,\"store_website_id\":1,\"store_group_id\":2,\"store_id\":3,\"theme_theme_id\":4,\"short_description\":5,\"actions\":6},\"columns\":{\"default\":{\"visible\":true,\"sorting\":false},\"short_description\":{\"visible\":true,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false},\"store_website_id\":{\"visible\":true,\"sorting\":false},\"store_group_id\":{\"visible\":true,\"sorting\":false},\"store_id\":{\"visible\":true,\"sorting\":false},\"theme_theme_id\":{\"visible\":true,\"sorting\":false}}},\"value\":\"Default View\"}}}','2025-12-09 18:33:17','2025-12-09 18:33:17'),(14,1,'design_config_listing','current',0,NULL,'{\"current\":{\"filters\":{\"applied\":{\"placeholder\":true}},\"displayMode\":\"grid\",\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20},\"positions\":{\"default\":0,\"store_website_id\":1,\"store_group_id\":2,\"store_id\":3,\"theme_theme_id\":4,\"short_description\":5,\"actions\":6},\"columns\":{\"default\":{\"visible\":true,\"sorting\":false},\"short_description\":{\"visible\":true,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false},\"store_website_id\":{\"visible\":true,\"sorting\":false},\"store_group_id\":{\"visible\":true,\"sorting\":false},\"store_id\":{\"visible\":true,\"sorting\":false},\"theme_theme_id\":{\"visible\":true,\"sorting\":false}}}}','2025-12-09 18:33:18','2025-12-09 18:33:18'),(15,1,'design_theme_listing','default',1,'Default View','{\"views\":{\"default\":{\"label\":\"Default View\",\"index\":\"default\",\"editable\":false,\"data\":{\"filters\":{\"applied\":{\"placeholder\":true}},\"columns\":{\"theme_id\":{\"visible\":false,\"sorting\":\"asc\"},\"theme_title\":{\"visible\":true,\"sorting\":false},\"parent_theme_title\":{\"visible\":true,\"sorting\":false},\"theme_path\":{\"visible\":true,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false}},\"displayMode\":\"grid\",\"positions\":{\"theme_id\":0,\"theme_title\":1,\"parent_theme_title\":2,\"theme_path\":3,\"actions\":4},\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20}},\"value\":\"Default View\"}}}','2026-01-26 23:37:50','2026-01-26 23:37:50'),(16,1,'design_theme_listing','current',0,NULL,'{\"current\":{\"filters\":{\"applied\":{\"placeholder\":true}},\"columns\":{\"theme_id\":{\"visible\":false,\"sorting\":\"asc\"},\"theme_title\":{\"visible\":true,\"sorting\":false},\"parent_theme_title\":{\"visible\":true,\"sorting\":false},\"theme_path\":{\"visible\":true,\"sorting\":false},\"actions\":{\"visible\":true,\"sorting\":false}},\"displayMode\":\"grid\",\"positions\":{\"theme_id\":0,\"theme_title\":1,\"parent_theme_title\":2,\"theme_path\":3,\"actions\":4},\"paging\":{\"pageSize\":20,\"current\":1,\"options\":{\"20\":{\"value\":20,\"label\":20},\"30\":{\"value\":30,\"label\":30},\"50\":{\"value\":50,\"label\":50},\"100\":{\"value\":100,\"label\":100},\"200\":{\"value\":200,\"label\":200}},\"value\":20}}}','2026-01-26 23:37:51','2026-01-26 23:37:51');

--
-- Table structure for table `mg_url_rewrite`
--

CREATE TABLE `mg_url_rewrite` (
  `url_rewrite_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Rewrite ID',
  `entity_type` varchar(32) NOT NULL COMMENT 'Entity type code',
  `entity_id` int(10) unsigned NOT NULL COMMENT 'Entity ID',
  `request_path` varchar(255) DEFAULT NULL COMMENT 'Request Path',
  `target_path` varchar(255) DEFAULT NULL COMMENT 'Target Path',
  `redirect_type` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Redirect Type',
  `store_id` smallint(5) unsigned NOT NULL COMMENT 'Store ID',
  `description` varchar(255) DEFAULT NULL COMMENT 'Description',
  `is_autogenerated` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Is rewrite generated automatically flag',
  `metadata` varchar(255) DEFAULT NULL COMMENT 'Meta data for url rewrite',
  PRIMARY KEY (`url_rewrite_id`),
  UNIQUE KEY `mg_URL_REWRITE_REQUEST_PATH_STORE_ID` (`request_path`,`store_id`),
  KEY `mg_URL_REWRITE_TARGET_PATH` (`target_path`),
  KEY `mg_URL_REWRITE_STORE_ID_ENTITY_ID` (`store_id`,`entity_id`),
  KEY `mg_URL_REWRITE_ENTITY_ID` (`entity_id`),
  KEY `mg_URL_REWRITE_IS_AUTOGENERATED_METADATA` (`is_autogenerated`,`metadata`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COMMENT='Url Rewrites';

--
-- Dumping data for table `mg_url_rewrite`
--

INSERT INTO `mg_url_rewrite` VALUES (1,'cms-page',1,'no-route','cms/page/view/page_id/1',0,1,NULL,1,NULL),(2,'cms-page',2,'home','cms/page/view/page_id/2',0,1,NULL,1,NULL),(3,'cms-page',3,'enable-cookies','cms/page/view/page_id/3',0,1,NULL,1,NULL),(4,'cms-page',4,'privacy-policy-cookie-restriction-mode','cms/page/view/page_id/4',0,1,NULL,1,NULL),(5,'category',3,'cocina.html','catalog/category/view/id/3',0,1,NULL,1,NULL),(6,'category',4,'bano.html','catalog/category/view/id/4',0,1,NULL,1,NULL),(7,'product',1,'75-1229n-monomando-para-lavabo-bajo-lexus-black.html','catalog/product/view/id/1',0,1,NULL,1,NULL),(8,'category',5,'recubrimiento.html','recubrimientos.html',301,1,NULL,0,NULL),(10,'category',7,'puertas.html','catalog/category/view/id/7',0,1,NULL,1,NULL),(11,'category',5,'recubrimientos.html','catalog/category/view/id/5',0,1,NULL,1,NULL),(13,'category',9,'iluminacion.html','catalog/category/view/id/9',0,1,NULL,1,NULL),(14,'category',10,'decoracion.html','catalog/category/view/id/10',0,1,NULL,1,NULL),(15,'category',11,'jardin.html','catalog/category/view/id/11',0,1,NULL,1,NULL),(16,'category',12,'mobiliario.html','catalog/category/view/id/12',0,1,NULL,1,NULL),(17,'category',13,'closet.html','catalog/category/view/id/13',0,1,NULL,1,NULL),(18,'category',14,'cocina/cocina-a-la-medida.html','catalog/category/view/id/14',0,1,NULL,1,NULL),(19,'category',15,'cocina/cocinas-modulares.html','catalog/category/view/id/15',0,1,NULL,1,NULL),(20,'category',16,'cocina/griferia.html','catalog/category/view/id/16',0,1,NULL,1,NULL),(21,'category',17,'cocina/vajillas-y-cubiertos.html','catalog/category/view/id/17',0,1,NULL,1,NULL),(22,'category',18,'cocina/batidoras.html','catalog/category/view/id/18',0,1,NULL,1,NULL),(23,'category',19,'mobiliario/decorativos.html','catalog/category/view/id/19',0,1,NULL,1,NULL),(24,'category',20,'mobiliario/salas.html','catalog/category/view/id/20',0,1,NULL,1,NULL),(25,'category',21,'mobiliario/comedores.html','catalog/category/view/id/21',0,1,NULL,1,NULL),(26,'category',22,'mobiliario/sofas.html','catalog/category/view/id/22',0,1,NULL,1,NULL),(27,'category',23,'mobiliario/sillones.html','catalog/category/view/id/23',0,1,NULL,1,NULL),(28,'category',24,'mobiliario/sillas.html','catalog/category/view/id/24',0,1,NULL,1,NULL),(29,'category',25,'mobiliario/mesas.html','catalog/category/view/id/25',0,1,NULL,1,NULL),(30,'category',27,'mobiliario/buros.html','catalog/category/view/id/27',0,1,NULL,1,NULL),(31,'category',28,'recubrimientos/porcelanico.html','catalog/category/view/id/28',0,1,NULL,1,NULL),(32,'category',29,'recubrimientos/ceramico.html','catalog/category/view/id/29',0,1,NULL,1,NULL),(33,'category',30,'bano/griferia.html','catalog/category/view/id/30',0,1,NULL,1,NULL),(34,'category',31,'bano/sanitarios.html','catalog/category/view/id/31',0,1,NULL,1,NULL),(35,'category',32,'bano/gabinetes.html','catalog/category/view/id/32',0,1,NULL,1,NULL),(36,'product',2,'monomando-para-lavabo-al-piso.html','catalog/product/view/id/2',0,1,NULL,1,NULL),(37,'product',3,'kit-de-instalacion-para-lavabo.html','catalog/product/view/id/3',0,1,NULL,1,NULL);

--
-- Table structure for table `mg_variable`
--

CREATE TABLE `mg_variable` (
  `variable_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Variable ID',
  `code` varchar(255) DEFAULT NULL COMMENT 'Variable Code',
  `name` varchar(255) DEFAULT NULL COMMENT 'Variable Name',
  PRIMARY KEY (`variable_id`),
  UNIQUE KEY `mg_VARIABLE_CODE` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Variables';

--
-- Dumping data for table `mg_variable`
--


--
-- Table structure for table `mg_variable_value`
--

CREATE TABLE `mg_variable_value` (
  `value_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Variable Value ID',
  `variable_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Variable ID',
  `store_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Store ID',
  `plain_value` text COMMENT 'Plain Text Value',
  `html_value` text COMMENT 'Html Value',
  PRIMARY KEY (`value_id`),
  UNIQUE KEY `mg_VARIABLE_VALUE_VARIABLE_ID_STORE_ID` (`variable_id`,`store_id`),
  KEY `mg_VARIABLE_VALUE_STORE_ID` (`store_id`),
  CONSTRAINT `mg_VARIABLE_VALUE_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_VARIABLE_VALUE_VARIABLE_ID_mg_VARIABLE_VARIABLE_ID` FOREIGN KEY (`variable_id`) REFERENCES `mg_variable` (`variable_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Variable Value';

--
-- Dumping data for table `mg_variable_value`
--


--
-- Table structure for table `mg_vault_payment_token`
--

CREATE TABLE `mg_vault_payment_token` (
  `entity_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Entity ID',
  `customer_id` int(10) unsigned DEFAULT NULL COMMENT 'Customer ID',
  `website_id` int(10) unsigned DEFAULT NULL COMMENT 'Website ID',
  `public_hash` varchar(128) NOT NULL COMMENT 'Hash code for using on frontend',
  `payment_method_code` varchar(128) NOT NULL COMMENT 'Payment method code',
  `type` varchar(128) NOT NULL COMMENT 'Type',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Created At',
  `expires_at` timestamp NULL DEFAULT NULL COMMENT 'Expires At',
  `gateway_token` varchar(255) NOT NULL COMMENT 'Gateway Token',
  `details` text COMMENT 'Details',
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `is_visible` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`entity_id`),
  UNIQUE KEY `mg_VAULT_PAYMENT_TOKEN_PUBLIC_HASH` (`public_hash`),
  UNIQUE KEY `UNQ_8A3A66ADA892E72943DABBC512E7BA4B` (`payment_method_code`,`customer_id`,`gateway_token`),
  KEY `mg_VAULT_PAYMENT_TOKEN_CSTR_ID_mg_CSTR_ENTT_ENTT_ID` (`customer_id`),
  CONSTRAINT `mg_VAULT_PAYMENT_TOKEN_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='Vault tokens of payment';

--
-- Dumping data for table `mg_vault_payment_token`
--


--
-- Table structure for table `mg_vault_payment_token_order_payment_link`
--

CREATE TABLE `mg_vault_payment_token_order_payment_link` (
  `order_payment_id` int(10) unsigned NOT NULL COMMENT 'Order payment ID',
  `payment_token_id` int(10) unsigned NOT NULL COMMENT 'Payment token ID',
  PRIMARY KEY (`order_payment_id`,`payment_token_id`),
  KEY `FK_9DDDB313998578BE4AC6CAA0A85DD75C` (`payment_token_id`),
  CONSTRAINT `FK_9DDDB313998578BE4AC6CAA0A85DD75C` FOREIGN KEY (`payment_token_id`) REFERENCES `mg_vault_payment_token` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_F2B3983591CCBE38509B9B3399D03DB2` FOREIGN KEY (`order_payment_id`) REFERENCES `mg_sales_order_payment` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Order payments to vault token';

--
-- Dumping data for table `mg_vault_payment_token_order_payment_link`
--


--
-- Table structure for table `mg_weee_tax`
--

CREATE TABLE `mg_weee_tax` (
  `value_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Value ID',
  `website_id` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Website ID',
  `entity_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Entity ID',
  `country` varchar(2) DEFAULT NULL COMMENT 'Country',
  `value` decimal(12,4) NOT NULL DEFAULT '0.0000' COMMENT 'Value',
  `state` int(11) NOT NULL DEFAULT '0' COMMENT 'State',
  `attribute_id` smallint(5) unsigned NOT NULL COMMENT 'Attribute ID',
  PRIMARY KEY (`value_id`),
  KEY `mg_WEEE_TAX_WEBSITE_ID` (`website_id`),
  KEY `mg_WEEE_TAX_ENTITY_ID` (`entity_id`),
  KEY `mg_WEEE_TAX_COUNTRY` (`country`),
  KEY `mg_WEEE_TAX_ATTRIBUTE_ID` (`attribute_id`),
  CONSTRAINT `mg_WEEE_TAX_ATTRIBUTE_ID_mg_EAV_ATTRIBUTE_ATTRIBUTE_ID` FOREIGN KEY (`attribute_id`) REFERENCES `mg_eav_attribute` (`attribute_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_WEEE_TAX_COUNTRY_mg_DIRECTORY_COUNTRY_COUNTRY_ID` FOREIGN KEY (`country`) REFERENCES `mg_directory_country` (`country_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_WEEE_TAX_ENTITY_ID_mg_CATALOG_PRODUCT_ENTITY_ENTITY_ID` FOREIGN KEY (`entity_id`) REFERENCES `mg_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
  CONSTRAINT `mg_WEEE_TAX_WEBSITE_ID_mg_STORE_WEBSITE_WEBSITE_ID` FOREIGN KEY (`website_id`) REFERENCES `mg_store_website` (`website_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Weee Tax';

--
-- Dumping data for table `mg_weee_tax`
--


--
-- Table structure for table `mg_widget`
--

CREATE TABLE `mg_widget` (
  `widget_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Widget ID',
  `widget_code` varchar(255) DEFAULT NULL COMMENT 'Widget code for template directive',
  `widget_type` varchar(255) DEFAULT NULL COMMENT 'Widget Type',
  `parameters` text COMMENT 'Parameters',
  PRIMARY KEY (`widget_id`),
  KEY `mg_WIDGET_WIDGET_CODE` (`widget_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Preconfigured Widgets';

--
-- Dumping data for table `mg_widget`
--


--
-- Table structure for table `mg_widget_instance`
--

CREATE TABLE `mg_widget_instance` (
  `instance_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Instance ID',
  `instance_type` varchar(255) DEFAULT NULL COMMENT 'Instance Type',
  `theme_id` int(10) unsigned NOT NULL COMMENT 'Theme ID',
  `title` varchar(255) DEFAULT NULL COMMENT 'Widget Title',
  `store_ids` varchar(255) NOT NULL DEFAULT '0' COMMENT 'Store ids',
  `widget_parameters` text COMMENT 'Widget parameters',
  `sort_order` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Sort order',
  PRIMARY KEY (`instance_id`),
  KEY `mg_WIDGET_INSTANCE_THEME_ID_mg_THEME_THEME_ID` (`theme_id`),
  CONSTRAINT `mg_WIDGET_INSTANCE_THEME_ID_mg_THEME_THEME_ID` FOREIGN KEY (`theme_id`) REFERENCES `mg_theme` (`theme_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Instances of Widget for Package Theme';

--
-- Dumping data for table `mg_widget_instance`
--


--
-- Table structure for table `mg_widget_instance_page`
--

CREATE TABLE `mg_widget_instance_page` (
  `page_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Page ID',
  `instance_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Instance ID',
  `page_group` varchar(25) DEFAULT NULL COMMENT 'Block Group Type',
  `layout_handle` varchar(255) DEFAULT NULL COMMENT 'Layout Handle',
  `block_reference` varchar(255) DEFAULT NULL COMMENT 'Container',
  `page_for` varchar(25) DEFAULT NULL COMMENT 'For instance entities',
  `entities` text COMMENT 'Catalog entities (comma separated)',
  `page_template` varchar(255) DEFAULT NULL COMMENT 'Path to widget template',
  PRIMARY KEY (`page_id`),
  KEY `mg_WIDGET_INSTANCE_PAGE_INSTANCE_ID` (`instance_id`),
  CONSTRAINT `FK_8CEB8E4A49C1C3B5DA3955BA7D727D5D` FOREIGN KEY (`instance_id`) REFERENCES `mg_widget_instance` (`instance_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Instance of Widget on Page';

--
-- Dumping data for table `mg_widget_instance_page`
--


--
-- Table structure for table `mg_widget_instance_page_layout`
--

CREATE TABLE `mg_widget_instance_page_layout` (
  `page_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Page ID',
  `layout_update_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Layout Update ID',
  PRIMARY KEY (`layout_update_id`,`page_id`),
  KEY `mg_WIDGET_INSTANCE_PAGE_LAYOUT_PAGE_ID` (`page_id`),
  CONSTRAINT `FK_4A92EC86A64E5198C495C2359162AD22` FOREIGN KEY (`page_id`) REFERENCES `mg_widget_instance_page` (`page_id`) ON DELETE CASCADE,
  CONSTRAINT `FK_79179AAD75F12559E0DB3AD9C51FF5BD` FOREIGN KEY (`layout_update_id`) REFERENCES `mg_layout_update` (`layout_update_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Layout updates';

--
-- Dumping data for table `mg_widget_instance_page_layout`
--


--
-- Table structure for table `mg_wishlist`
--

CREATE TABLE `mg_wishlist` (
  `wishlist_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Wishlist ID',
  `customer_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Customer ID',
  `shared` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Sharing flag (0 or 1)',
  `sharing_code` varchar(32) DEFAULT NULL COMMENT 'Sharing encrypted code',
  `updated_at` timestamp NULL DEFAULT NULL COMMENT 'Last updated date',
  PRIMARY KEY (`wishlist_id`),
  UNIQUE KEY `mg_WISHLIST_CUSTOMER_ID` (`customer_id`),
  KEY `mg_WISHLIST_SHARED` (`shared`),
  CONSTRAINT `mg_WISHLIST_CUSTOMER_ID_mg_CUSTOMER_ENTITY_ENTITY_ID` FOREIGN KEY (`customer_id`) REFERENCES `mg_customer_entity` (`entity_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Wishlist main Table';

--
-- Dumping data for table `mg_wishlist`
--


--
-- Table structure for table `mg_wishlist_item`
--

CREATE TABLE `mg_wishlist_item` (
  `wishlist_item_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Wishlist item ID',
  `wishlist_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Wishlist ID',
  `product_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Product ID',
  `store_id` smallint(5) unsigned DEFAULT NULL COMMENT 'Store ID',
  `added_at` timestamp NULL DEFAULT NULL COMMENT 'Add date and time',
  `description` text COMMENT 'Short description of wish list item',
  `qty` decimal(12,4) NOT NULL COMMENT 'Qty',
  PRIMARY KEY (`wishlist_item_id`),
  KEY `mg_WISHLIST_ITEM_WISHLIST_ID` (`wishlist_id`),
  KEY `mg_WISHLIST_ITEM_PRODUCT_ID` (`product_id`),
  KEY `mg_WISHLIST_ITEM_STORE_ID` (`store_id`),
  CONSTRAINT `mg_WISHLIST_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_WISHLIST_ITEM_STORE_ID_mg_STORE_STORE_ID` FOREIGN KEY (`store_id`) REFERENCES `mg_store` (`store_id`) ON DELETE SET NULL,
  CONSTRAINT `mg_WISHLIST_ITEM_WISHLIST_ID_mg_WISHLIST_WISHLIST_ID` FOREIGN KEY (`wishlist_id`) REFERENCES `mg_wishlist` (`wishlist_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Wishlist items';

--
-- Dumping data for table `mg_wishlist_item`
--


--
-- Table structure for table `mg_wishlist_item_option`
--

CREATE TABLE `mg_wishlist_item_option` (
  `option_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Option ID',
  `wishlist_item_id` int(10) unsigned NOT NULL COMMENT 'Wishlist Item ID',
  `product_id` int(10) unsigned NOT NULL COMMENT 'Product ID',
  `code` varchar(255) NOT NULL COMMENT 'Code',
  `value` text COMMENT 'Value',
  PRIMARY KEY (`option_id`),
  KEY `FK_50A2E7BB0F31EC0BC615E7F5040A12AC` (`wishlist_item_id`),
  CONSTRAINT `FK_50A2E7BB0F31EC0BC615E7F5040A12AC` FOREIGN KEY (`wishlist_item_id`) REFERENCES `mg_wishlist_item` (`wishlist_item_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Wishlist Item Option Table';

--
-- Dumping data for table `mg_wishlist_item_option`
--


--
-- Final view structure for view `mg_inventory_stock_1`
--

/*!50001 DROP VIEW IF EXISTS `mg_inventory_stock_1`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`gamamojo_ei3`@`%` SQL SECURITY INVOKER */
/*!50001 VIEW `mg_inventory_stock_1` AS select distinct `legacy_stock_status`.`product_id` AS `product_id`,`legacy_stock_status`.`website_id` AS `website_id`,`legacy_stock_status`.`stock_id` AS `stock_id`,`legacy_stock_status`.`qty` AS `quantity`,`legacy_stock_status`.`stock_status` AS `is_salable`,`product`.`sku` AS `sku` from (`mg_cataloginventory_stock_status` `legacy_stock_status` join `mg_catalog_product_entity` `product` on((`legacy_stock_status`.`product_id` = `product`.`entity_id`))) */;


