From c9f89f3854a08d4f22ab86d90546595e915094cc Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Fri, 15 Mar 2019 20:28:28 +0100 Subject: [PATCH 1/6] Add fk_project to product table Prepare the generation of a product from a project. --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index a7f5ca87c9a..d3c5af09506 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -254,3 +254,5 @@ ALTER TABLE llx_expensereport_det ADD COLUMN subprice double(24,8) DEFAULT 0 NOT ALTER TABLE llx_product_attribute_combination ADD INDEX idx_product_att_com_product_parent (fk_product_parent); ALTER TABLE llx_product_attribute_combination ADD INDEX idx_product_att_com_product_child (fk_product_child); + +ALTER TABLE llx_actioncomm ADD COLUMN calling_duration integer; From 5ee749c19d6245a2158e2073152bc566caff74e2 Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Fri, 15 Mar 2019 20:46:38 +0100 Subject: [PATCH 2/6] Update 9.0.0-10.0.0.sql --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index d3c5af09506..bd3b3aa34b7 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -254,5 +254,6 @@ ALTER TABLE llx_expensereport_det ADD COLUMN subprice double(24,8) DEFAULT 0 NOT ALTER TABLE llx_product_attribute_combination ADD INDEX idx_product_att_com_product_parent (fk_product_parent); ALTER TABLE llx_product_attribute_combination ADD INDEX idx_product_att_com_product_child (fk_product_child); +ALTER TABLE llx_product ADD COLUMN fk_project integer, ADD INDEX fk_project (fk_project); ALTER TABLE llx_actioncomm ADD COLUMN calling_duration integer; From cf0bc886011bfd25f7791882d917e4516a846bc7 Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Mon, 18 Mar 2019 20:19:30 +0100 Subject: [PATCH 3/6] Update llx_product.sql --- htdocs/install/mysql/tables/llx_product.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index 8569c6e28d2..b665dc911fa 100755 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -94,5 +94,6 @@ create table llx_product fk_price_expression integer, -- Link to the rule for dynamic price calculation desiredstock integer DEFAULT 0, fk_unit integer DEFAULT NULL, - price_autogen tinyint DEFAULT 0 + price_autogen tinyint DEFAULT 0, + fk_project integer DEFAULT NULL )ENGINE=innodb; From 56bee8a20fed0e44f6aba5f7d01030571ceb0e2d Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Mon, 18 Mar 2019 20:23:45 +0100 Subject: [PATCH 4/6] Update llx_product.key.sql --- htdocs/install/mysql/tables/llx_product.key.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/tables/llx_product.key.sql b/htdocs/install/mysql/tables/llx_product.key.sql index d339f2082ee..bd48aa99cd4 100644 --- a/htdocs/install/mysql/tables/llx_product.key.sql +++ b/htdocs/install/mysql/tables/llx_product.key.sql @@ -30,6 +30,7 @@ ALTER TABLE llx_product ADD INDEX idx_product_seuil_stock_alerte (seuil_stock_al ALTER TABLE llx_product ADD INDEX idx_product_fk_country (fk_country); ALTER TABLE llx_product ADD INDEX idx_product_fk_user_author (fk_user_author); ALTER TABLE llx_product ADD INDEX idx_product_fk_barcode_type (fk_barcode_type); +ALTER TABLE llx_product ADD INDEX idx_product_fk_project (fk_project); ALTER TABLE llx_product ADD UNIQUE INDEX uk_product_barcode (barcode, fk_barcode_type, entity); ALTER TABLE llx_product ADD CONSTRAINT fk_product_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid); From 52b91499baaf6ac69b955af68e9523eb46cd41f6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Mar 2019 18:31:13 +0100 Subject: [PATCH 5/6] Update 9.0.0-10.0.0.sql --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index bd3b3aa34b7..7f882c0be97 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -254,6 +254,7 @@ ALTER TABLE llx_expensereport_det ADD COLUMN subprice double(24,8) DEFAULT 0 NOT ALTER TABLE llx_product_attribute_combination ADD INDEX idx_product_att_com_product_parent (fk_product_parent); ALTER TABLE llx_product_attribute_combination ADD INDEX idx_product_att_com_product_child (fk_product_child); -ALTER TABLE llx_product ADD COLUMN fk_project integer, ADD INDEX fk_project (fk_project); +ALTER TABLE llx_product ADD COLUMN fk_project integer DEFAULT NULL; +ALTER TABLE llx_product ADD INDEX idx_product_fk_project (fk_project); ALTER TABLE llx_actioncomm ADD COLUMN calling_duration integer; From ae2f76f6bde058ec448554a0c53b50a17747524b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Mar 2019 18:32:40 +0100 Subject: [PATCH 6/6] Update llx_product.sql --- htdocs/install/mysql/tables/llx_product.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index b665dc911fa..fb6e4cf5f1a 100755 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -95,5 +95,5 @@ create table llx_product desiredstock integer DEFAULT 0, fk_unit integer DEFAULT NULL, price_autogen tinyint DEFAULT 0, - fk_project integer DEFAULT NULL + fk_project integer DEFAULT NULL -- Used when product was generated by a project or is specifif to a project )ENGINE=innodb;