Migrate: Honor attribute Huber

This commit is contained in:
2024-02-22 11:12:49 +01:00
parent 3324a9a238
commit 25a0722f96

View File

@ -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'), '/"', '"'), '/-', '-');