diff --git a/scripts/product.sql b/scripts/product.sql index 0096c57..618c0da 100644 --- a/scripts/product.sql +++ b/scripts/product.sql @@ -217,7 +217,7 @@ ALTER TABLE `catalog_product_link` DROP INDEX `CATALOG_PRODUCT_LINK_LINK_TYPE_ID_PRODUCT_ID_LINKED_PRODUCT_ID`, DROP COLUMN `product_id`, CHANGE COLUMN `new_product_id` `product_id` INT(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT 'Product ID', - ADD INDEX CATALOG_PRODUCT_LINK_PRODUCT_ID (`product_id`), + ADD INDEX `CATALOG_PRODUCT_LINK_PRODUCT_ID` (`product_id`), ADD CONSTRAINT `CATALOG_PRODUCT_LINK_LINK_TYPE_ID_PRODUCT_ID_LINKED_PRODUCT_ID` UNIQUE KEY (`link_type_id`,`product_id`,`linked_product_id`); -- --------------- @@ -332,7 +332,7 @@ ALTER TABLE `catalog_product_entity_varchar` -- Gallery value to entity ALTER TABLE `catalog_product_entity_media_gallery_value_to_entity` DROP FOREIGN KEY `CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_ROW_ID_CAT_PRD_ENTT_ROW_ID`, - DROP CONSTRAINT `CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ENTT_ID`, + DROP INDEX `CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ENTT_ID`, ADD CONSTRAINT `CAT_PRD_ENTT_MDA_GLR_VAL_TO_ENTT_VAL_ID_ENTT_ID` UNIQUE KEY (`value_id`,`entity_id`), DROP COLUMN `row_id`; @@ -340,14 +340,16 @@ ALTER TABLE `catalog_product_entity_media_gallery_value_to_entity` ALTER TABLE `catalog_product_entity_media_gallery_value` DROP FOREIGN KEY `CAT_PRD_ENTT_MDA_GLR_VAL_ROW_ID_CAT_PRD_ENTT_ROW_ID`, DROP INDEX `CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_ENTITY_ID`, - DROP INDEX `CAT_PRD_ENTT_MDA_GLR_VAL_ENTT_ID_VAL_ID_STORE_ID`, + ADD INDEX `CATALOG_PRODUCT_ENTITY_MEDIA_GALLERY_VALUE_ENTITY_ID` (`entity_id`), ADD CONSTRAINT `CAT_PRD_ENTT_MDA_GLR_VAL_ENTT_ID_VAL_ID_STORE_ID` UNIQUE KEY (`entity_id`,`value_id`,`store_id`), DROP COLUMN `row_id`; -- Gallery ALTER TABLE `catalog_product_entity_gallery` DROP FOREIGN KEY `CAT_PRD_ENTT_GLR_ROW_ID_CAT_PRD_ENTT_ROW_ID`, + DROP INDEX `CATALOG_PRODUCT_ENTITY_GALLERY_ENTITY_ID`, DROP INDEX `CATALOG_PRODUCT_ENTITY_GALLERY_ENTITY_ID_ATTRIBUTE_ID_STORE_ID`, + ADD INDEX `CATALOG_PRODUCT_ENTITY_GALLERY_ENTITY_ID` (`entity_id`), ADD CONSTRAINT `CATALOG_PRODUCT_ENTITY_GALLERY_ENTITY_ID_ATTRIBUTE_ID_STORE_ID` UNIQUE KEY (`entity_id`,`attribute_id`,`store_id`), DROP COLUMN `row_id`;