From d4bb6490e98f2e455c5c68d37b8776828317c84b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 6 Oct 2019 16:25:22 +0200 Subject: [PATCH] Fix migration --- htdocs/install/mysql/migration/10.0.0-11.0.0.sql | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index e33bcbec638..1333f3a9200 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -33,6 +33,19 @@ ALTER TABLE llx_account_bookkeeping ADD COLUMN date_export datetime DEFAULT NULL ALTER TABLE llx_expensereport ADD COLUMN paid smallint default 0 NOT NULL; UPDATE llx_expensereport set paid = 1 WHERE fk_statut = 6 and paid = 0; +UPDATE llx_c_units SET short_label = 'i' WHERE code = 'MI'; +UPDATE llx_c_units SET unit_type = 'weight', short_label = 'kg', scale = 0 WHERE code = 'KG'; +UPDATE llx_c_units SET unit_type = 'weight', short_label = 'g', scale = -3 WHERE code = 'G'; +UPDATE llx_c_units SET unit_type = 'time' WHERE code IN ('S','H','D'); +UPDATE llx_c_units SET unit_type = 'size' WHERE code IN ('M','LM'); +UPDATE llx_c_units SET label = 'SizeUnitm', scale = 0 WHERE code IN ('M'); +UPDATE llx_c_units SET active = 0, scale = 0 WHERE code IN ('LM'); +UPDATE llx_c_units SET unit_type = 'surface', scale = 0 WHERE code IN ('M2'); +UPDATE llx_c_units SET unit_type = 'volume', scale = 0 WHERE code IN ('M3','L'); +UPDATE llx_c_units SET scale = -3, active = 0 WHERE code IN ('L'); +UPDATE llx_c_units SET label = 'VolumeUnitm3' WHERE code IN ('M3'); +UPDATE llx_c_units SET label = 'SurfaceUnitm2' WHERE code IN ('M2'); + -- For v11