Archive old migrations (#426)

* Archive old migrations

* Fix invalid placement of migrations
This commit is contained in:
Rikard Bartholf
2024-10-17 11:19:12 +02:00
committed by GitHub
parent 763262c108
commit ddcbd0afb0
500 changed files with 0 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
ALTER TABLE prices_other_products DROP COLUMN IF EXISTS paint_card_sample_price;
-- Add new column to prices_other_products for paint card sample (with made up prices)
ALTER TABLE prices_other_products ADD COLUMN paint_card_sample_price NUMERIC;
UPDATE prices_other_products SET paint_card_sample_price = wallpaper_sample_price; -- Set paint card sample price to the same as wallpaper sample price for now
ALTER TABLE prices_other_products ALTER COLUMN paint_card_sample_price SET NOT NULL;
ALTER TABLE prices_other_products ADD CONSTRAINT valid_paint_card_sample_price CHECK (prices_other_products.paint_card_sample_price > 0);
ALTER TYPE order_row_sub_type
ADD VALUE IF NOT EXISTS 'paint_card_sample';