From 81f800b5de770285f998abefd3f7cc3d49d17615 Mon Sep 17 00:00:00 2001 From: Jake Kasper Date: Thu, 21 Aug 2025 20:14:53 -0400 Subject: [PATCH] products update --- backend/scripts/seed-products.sql | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/backend/scripts/seed-products.sql b/backend/scripts/seed-products.sql index c363674..06b5772 100644 --- a/backend/scripts/seed-products.sql +++ b/backend/scripts/seed-products.sql @@ -97,9 +97,16 @@ BEGIN ('Sticker Spreader', 'Bond', adjuvant_cat_id, 'liquid', 'Pinolene + Surfactants', 'Improves adhesion and spreading of sprays') ON CONFLICT (name, brand) DO NOTHING; + -- Insert common tank mix products + INSERT INTO products (name, brand, category_id, product_type, active_ingredients, description) VALUES + ('Tank Mix: 2,4-D + Triclopyr', 'Custom', post_emergent_cat_id, 'liquid', '2,4-D + Triclopyr', 'Common tank mix for tough broadleaf and woody weeds'), + ('Tank Mix: Prodiamine + Fertilizer', 'Custom', pre_emergent_cat_id, 'granular', 'Prodiamine + 19-0-6', 'Pre-emergent with slow-release fertilizer'), + ('Tank Mix: Fungicide + Insecticide', 'Custom', fungicide_cat_id, 'liquid', 'Propiconazole + Bifenthrin', 'Disease and insect control combination') + ON CONFLICT (name, brand) DO NOTHING; + END $$; --- Insert application rates for key products +-- Insert application rates for key products in separate block DO $$ DECLARE product_record RECORD; @@ -181,13 +188,4 @@ BEGIN ON CONFLICT DO NOTHING; END IF; -END $$; - --- Create some common product combinations that users often mix -INSERT INTO products (name, brand, category_id, product_type, active_ingredients, description) VALUES -('Tank Mix: 2,4-D + Triclopyr', 'Custom', post_emergent_cat_id, 'liquid', '2,4-D + Triclopyr', 'Common tank mix for tough broadleaf and woody weeds'), -('Tank Mix: Prodiamine + Fertilizer', 'Custom', pre_emergent_cat_id, 'granular', 'Prodiamine + 19-0-6', 'Pre-emergent with slow-release fertilizer'), -('Tank Mix: Fungicide + Insecticide', 'Custom', fungicide_cat_id, 'liquid', 'Propiconazole + Bifenthrin', 'Disease and insect control combination') -ON CONFLICT (name, brand) DO NOTHING; - -COMMIT; \ No newline at end of file +END $$; \ No newline at end of file