From f7879b9e01c133ee08260afde2ca87bb62d6cfd7 Mon Sep 17 00:00:00 2001 From: Max <149727588+maexkru@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:40:09 +0100 Subject: [PATCH] Add prices_other_products.wallpaper_glue_price (#435) --- migrations/000.512.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 migrations/000.512.sql diff --git a/migrations/000.512.sql b/migrations/000.512.sql new file mode 100644 index 0000000..11392ac --- /dev/null +++ b/migrations/000.512.sql @@ -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);