From c0ad86cd5c6ae6745be083caa76fd50527041cc5 Mon Sep 17 00:00:00 2001 From: Florian Henry Date: Thu, 31 Oct 2013 13:23:38 +0100 Subject: [PATCH] Add column fk_c_element_role into llx_actioncomm_ressource to manage role of linked element In this exemple we can have fk_element = 1 element_type= "user" or contact or place or whatever element fk_c_element_role = 1 // 'Guest' or Host or whatever define in dictionnary fk_c_element_status = Present // or whatever define in dictionnary according element type --- htdocs/install/mysql/migration/3.4.0-3.5.0.sql | 3 ++- htdocs/install/mysql/tables/llx_actioncomm_resources.sql | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql index e417a408d50..809c1edb6a7 100755 --- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql +++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql @@ -325,7 +325,8 @@ create table llx_actioncomm_resources fk_actioncomm integer NOT NULL, element_type varchar(50) NOT NULL, fk_element integer NOT NULL, - fk_element_status varchar(32) NULL + fk_c_element_role integer NOT NULL, + fk_c_element_status varchar(32) NULL ) ENGINE=innodb; ALTER TABLE llx_actioncomm_resources ADD UNIQUE INDEX idx_actioncomm_resources_idx1 (fk_actioncomm, element_type, fk_element); ALTER TABLE llx_actioncomm_resources ADD INDEX idx_actioncomm_resources_fk_element (fk_element); diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql index 781744e7c60..e475efce388 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql @@ -26,5 +26,6 @@ create table llx_actioncomm_resources fk_actioncomm integer NOT NULL, element_type varchar(50) NOT NULL, fk_element integer NOT NULL, - fk_element_status varchar(32) NULL + fk_c_element_role integer NOT NULL, + fk_c_element_status varchar(32) NULL ) ENGINE=innodb;