From 31bcc47b68000ea0ce30990b597f7c120a980110 Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Thu, 14 Feb 2019 13:47:02 +0100 Subject: [PATCH 1/4] Add default warehouse id for a user This will help to organize employees and know the default warehouse for a customer. --- 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 ddd164deba7..e0df233a733 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 @@ -157,3 +157,5 @@ INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VAL INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('H', '3600','hour','h', 'time', 1); INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D','12960000','day','d', 'time', 1); +-- Default Warehouse id for a user +ALTER TABLE `llx_user` ADD `default_warehouse` INTEGER NULL AFTER `default_c_exp_tax_cat`; From 0a8c72c93b69b3b6fcf46c2a37999b133855074e Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Thu, 14 Feb 2019 19:36:23 +0100 Subject: [PATCH 2/4] rename column default_warehouse to fk_warehouse --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 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 e0df233a733..34162ffa2b5 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 @@ -158,4 +158,4 @@ INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VAL INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D','12960000','day','d', 'time', 1); -- Default Warehouse id for a user -ALTER TABLE `llx_user` ADD `default_warehouse` INTEGER NULL AFTER `default_c_exp_tax_cat`; +ALTER TABLE `llx_user` ADD `fk_warehouse` INTEGER NULL AFTER `default_c_exp_tax_cat`; From 2fe3b7acc72b40462e2abd552b4ff934cffa18b3 Mon Sep 17 00:00:00 2001 From: wdammak <26695620+wdammak@users.noreply.github.com> Date: Thu, 14 Feb 2019 19:50:57 +0100 Subject: [PATCH 3/4] Add default warehouse for a user --- htdocs/install/mysql/tables/llx_user.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index 90dc8a835ef..cb9bf35ccd0 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -99,5 +99,6 @@ create table llx_user import_key varchar(14), -- import key default_range integer, - default_c_exp_tax_cat integer + default_c_exp_tax_cat integer, + fk_warehouse integer )ENGINE=innodb; From 662d707320d31006be40fd84d84477b91b888e9b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Feb 2019 15:06:00 +0100 Subject: [PATCH 4/4] Update 9.0.0-10.0.0.sql --- htdocs/install/mysql/migration/9.0.0-10.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 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 34162ffa2b5..a23393f7611 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 @@ -158,4 +158,4 @@ INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VAL INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('D','12960000','day','d', 'time', 1); -- Default Warehouse id for a user -ALTER TABLE `llx_user` ADD `fk_warehouse` INTEGER NULL AFTER `default_c_exp_tax_cat`; +ALTER TABLE llx_user ADD COLUMN fk_warehouse INTEGER NULL;