From ac938224c3e56d72cc6db7fa6907e42f90ac146e Mon Sep 17 00:00:00 2001 From: Fredrik Ringqvist <35255659+fredrikphotowall@users.noreply.github.com> Date: Tue, 2 May 2023 23:19:52 +0200 Subject: [PATCH] Add wallpaper samples price constraint (#322) --- migrations/000.413.sql | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 migrations/000.413.sql diff --git a/migrations/000.413.sql b/migrations/000.413.sql new file mode 100644 index 0000000..de8af66 --- /dev/null +++ b/migrations/000.413.sql @@ -0,0 +1,5 @@ +-- Remove duplicate check on wallpaper kit price +ALTER TABLE prices_other_products DROP CONSTRAINT prices_other_products_wallpaper_kit_price_check1; + +-- Add check on on samples price +ALTER TABLE prices_other_products ADD CONSTRAINT valid_samples_price CHECK (wallpaper_sample_price > 0);