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
+7
View File
@@ -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);