From aafc46cb95bc2937759102f82af51ea3fc17e724 Mon Sep 17 00:00:00 2001 From: Martin Date: Mon, 28 Jan 2019 12:58:29 +0100 Subject: [PATCH] P5-3523 add poster blacklisting to all products that have (wallpaper, photo-wallpaper, canvas) blacklisting --- migrations/000.087.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 migrations/000.087.sql diff --git a/migrations/000.087.sql b/migrations/000.087.sql new file mode 100644 index 0000000..444e01a --- /dev/null +++ b/migrations/000.087.sql @@ -0,0 +1,5 @@ +-- P5-3523 add poster blacklisting to all products that have (wallpaper, photo-wallpaper, canvas) blacklisting + +INSERT INTO product_blacklist (product_id, language_id, territory_id, group_id) +SELECT product_id, language_id, territory_id, 7 FROM product_blacklist +GROUP BY product_id, language_id, territory_id HAVING count(1) = 3;