Add prices_other_products.wallpaper_glue_price (#435)

This commit is contained in:
Max
2024-11-06 15:40:09 +01:00
committed by GitHub
parent 7c3d55a1a6
commit f7879b9e01
+7
View File
@@ -0,0 +1,7 @@
ALTER TABLE prices_other_products DROP COLUMN IF EXISTS wallpaper_glue_price;
-- Add new column to prices_other_products for wallpaper glue price
ALTER TABLE prices_other_products ADD COLUMN wallpaper_glue_price NUMERIC;
UPDATE prices_other_products SET wallpaper_glue_price = 99;
ALTER TABLE prices_other_products ALTER COLUMN wallpaper_glue_price SET NOT NULL;
ALTER TABLE prices_other_products ADD CONSTRAINT valid_wallpaper_glue_price CHECK (prices_other_products.wallpaper_glue_price > 0);