From 039011113216850190c7648be0302f074a199e4c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 20 Aug 2020 23:32:35 +0200 Subject: [PATCH] Add column bomtype --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 2 ++ htdocs/install/mysql/tables/llx_bom_bom.sql | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 70e8f11ed99..4066c8bf205 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -40,6 +40,8 @@ ALTER TABLE llx_bom_bom MODIFY COLUMN duration double(24,8); -- For v13 +ALTER TABLE llx_bom_bom ADD COLUMN bomtype integer DEFAULT 0; + UPDATE llx_document_model set nom = 'standard' where nom = 'Standard' and type ='stock'; UPDATE llx_document_model set nom = 'stdmovement', type = 'movement' where nom = 'StdMouvement' and type ='mouvement'; diff --git a/htdocs/install/mysql/tables/llx_bom_bom.sql b/htdocs/install/mysql/tables/llx_bom_bom.sql index d61b404806d..45c5fce3485 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom.sql @@ -18,7 +18,8 @@ CREATE TABLE llx_bom_bom( -- BEGIN MODULEBUILDER FIELDS rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL, entity integer DEFAULT 1 NOT NULL, - ref varchar(128) NOT NULL, + ref varchar(128) NOT NULL, + bomtype integer DEFAULT 0, -- 0 for a BOM to manufacture, 1 for a BOM to dismantle label varchar(255), fk_product integer, description text,