From 7f001c8d9e8ac094900d5ab0b917eec8337e0e76 Mon Sep 17 00:00:00 2001 From: Anders Gustafsson <34234789+anders-photowall@users.noreply.github.com> Date: Mon, 8 Jun 2026 09:00:48 +0200 Subject: [PATCH] 9602 - Add 4th wallpaper material to db (#563) --- migrations/000.635.sql | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 migrations/000.635.sql diff --git a/migrations/000.635.sql b/migrations/000.635.sql new file mode 100644 index 0000000..37fe283 --- /dev/null +++ b/migrations/000.635.sql @@ -0,0 +1,18 @@ +-- Add matte-wallpaper material and drop legacy price column from product-materials + +-- 1. Insert the new material +INSERT INTO "product-materials" (materialid, material) + VALUES (7, 'matte-wallpaper'); + +-- 2. Add pricing rows for all existing market × segment combinations (copy from premium-wallpaper, material_id=4) +INSERT INTO prices_wallpaper_m2 (material_id, segment_id, market_id, price, updated) + SELECT 7, segment_id, market_id, price, NOW() + FROM prices_wallpaper_m2 + WHERE material_id = 4; + +-- 3. Add to product-printproducts_materials for all print products that have premium-wallpaper (material 4) +INSERT INTO "product-printproducts_materials" (printid, materialid) + SELECT printid, 7 + FROM "product-printproducts_materials" + WHERE materialid = 4; +