From 25a0722f96f356ae7fd7e69ef9cc364b552acb5c Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 22 Feb 2024 11:12:49 +0100 Subject: [PATCH] Migrate: Honor attribute Huber --- Elwig/Resources/Sql/17-18.sql | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Elwig/Resources/Sql/17-18.sql b/Elwig/Resources/Sql/17-18.sql index 4368b34..5e0fbfa 100644 --- a/Elwig/Resources/Sql/17-18.sql +++ b/Elwig/Resources/Sql/17-18.sql @@ -83,10 +83,15 @@ PRAGMA writable_schema = OFF; UPDATE area_commitment SET cultid = NULL WHERE cultid = 'N'; DELETE FROM wine_cultivation WHERE cultid = 'N'; UPDATE wine_cultivation SET cultid = 'B', name = 'Bio', description = 'AT-BIO-302' WHERE cultid = 'BIO'; +UPDATE wine_cultivation SET description = 'Kontrollierte Integrierte Produktion' WHERE cultid = 'KIP'; UPDATE area_commitment SET cultid = 'B', vtrgid = SUBSTR(vtrgid, 0, 2) WHERE vtrgid LIKE '__B'; +UPDATE area_commitment SET cultid = 'B' WHERE vtrgid LIKE '__HU'; DELETE FROM area_commitment_type WHERE attrid = 'B'; UPDATE delivery_part SET cultid = 'B', attrid = NULL WHERE attrid = 'B'; +UPDATE delivery_part SET cultid = 'B' WHERE attrid = 'HU'; DELETE FROM wine_attribute WHERE attrid = 'B'; +UPDATE wine_attribute SET name = 'Huber' WHERE attrid = 'HU'; +UPDATE wine_attribute SET max_kg_per_ha = NULL WHERE max_kg_per_ha = 10000; UPDATE payment_variant SET data = REPLACE(REPLACE(REPLACE(data, '/B', '-B'), '/"', '"'), '/-', '-');