Remove invalid imported products (#339)
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE prod_to_delete AS
|
||||
SELECT productid FROM "product-products_fields"
|
||||
WHERE fieldid=36 AND value='batch1202';
|
||||
|
||||
DELETE FROM "product-products_fields"
|
||||
WHERE productid IN (SELECT productid FROM prod_to_delete);
|
||||
|
||||
DELETE FROM "collections_products"
|
||||
WHERE product_id IN (SELECT productid FROM prod_to_delete);
|
||||
|
||||
DELETE FROM "product-products"
|
||||
WHERE productid IN (SELECT productid FROM prod_to_delete);
|
||||
|
||||
DROP TABLE prod_to_delete;
|
||||
Reference in New Issue
Block a user