Skip to content

Commit ec616ec

Browse files
authored
Merge pull request #16 from LucaGallinari/patch-1
Delete from category table instead of the product one
2 parents d5b5f43 + 2184747 commit ec616ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/category.sql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ ALTER TABLE `catalog_category_entity_varchar`
1717
-- Clean duplicates for catalog category entity
1818

1919
DELETE e
20-
FROM `catalog_product_entity` e
20+
FROM `catalog_category_entity` e
2121
LEFT OUTER JOIN (
2222
SELECT MAX(`updated_in`) as `last_updated_in`, `entity_id`
23-
FROM `catalog_product_entity`
23+
FROM `catalog_category_entity`
2424
GROUP BY `entity_id`
2525
) AS p
2626
ON e.`entity_id` = p.`entity_id` AND e.`updated_in` = p.`last_updated_in`
@@ -58,7 +58,7 @@ DELETE FROM `catalog_category_entity_text` WHERE row_id NOT IN (SELECT MAX(row_i
5858
DELETE FROM `catalog_category_entity_varchar` WHERE row_id NOT IN (SELECT MAX(row_id) FROM catalog_category_entity GROUP BY entity_id) ORDER BY `entity_id` ASC;
5959

6060
-- ------------------------------------------------------------------
61-
-- Update the `entity_id` relation link for catalog product entity --
61+
-- Update the `entity_id` relation link for catalog category entity --
6262
-- ------------------------------------------------------------------
6363

6464
-- Datetime

0 commit comments

Comments
 (0)