From 22548728397831b94922d9236909e8f89ca02ec3 Mon Sep 17 00:00:00 2001 From: Anders Gustafsson <34234789+anders-photowall@users.noreply.github.com> Date: Tue, 10 Sep 2024 10:21:08 +0200 Subject: [PATCH] 6111 - Add wall paint kit price to db (#418) --- migrations/000.498.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 migrations/000.498.sql diff --git a/migrations/000.498.sql b/migrations/000.498.sql new file mode 100644 index 0000000..3566137 --- /dev/null +++ b/migrations/000.498.sql @@ -0,0 +1,7 @@ +ALTER TABLE prices_other_products DROP COLUMN IF EXISTS wall_paint_kit_price; + +-- Add new column to prices_other_products for wall paint kit (with made up prices) +ALTER TABLE prices_other_products ADD COLUMN wall_paint_kit_price NUMERIC; +UPDATE prices_other_products SET wall_paint_kit_price = wallpaper_kit_price; -- Set paint kit price to the same as wallpaper kit price for now +ALTER TABLE prices_other_products ALTER COLUMN wall_paint_kit_price SET NOT NULL; +ALTER TABLE prices_other_products ADD CONSTRAINT valid_wall_paint_kit_price CHECK (prices_other_products.wall_paint_kit_price > 0);