9602 - Add 4th wallpaper material to db (#563)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user