From 788d499bf614cb92401c605d86d353943c2ff0c3 Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Wed, 11 May 2016 18:50:02 +0200 Subject: [PATCH 1/2] Change resource type to dolresource in class --- htdocs/resource/class/dolresource.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/resource/class/dolresource.class.php b/htdocs/resource/class/dolresource.class.php index b6b4eec8be2..f7adb19112e 100644 --- a/htdocs/resource/class/dolresource.class.php +++ b/htdocs/resource/class/dolresource.class.php @@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT."/core/lib/functions2.lib.php"; */ class Dolresource extends CommonObject { - var $element='resource'; //!< Id that identify managed objects + var $element='dolresource'; //!< Id that identify managed objects var $table_element='resource'; //!< Name of table without prefix where object is stored var $resource_id; From 9b11907c70f3df91895b5a156fb47bcd98f4ec90 Mon Sep 17 00:00:00 2001 From: Ion Agorria Date: Wed, 11 May 2016 18:50:25 +0200 Subject: [PATCH 2/2] Update existing linked elements to new type --- htdocs/install/mysql/migration/3.9.0-4.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql index 20c1c1d0de3..14849e6fa9c 100644 --- a/htdocs/install/mysql/migration/3.9.0-4.0.0.sql +++ b/htdocs/install/mysql/migration/3.9.0-4.0.0.sql @@ -438,6 +438,7 @@ ALTER TABLE llx_resource ADD COLUMN extraparams varchar(255); ALTER TABLE llx_element_resources ADD COLUMN duree real; -- total duration of using ressource +UPDATE llx_element_resources SET resource_type = 'dolresource' WHERE resource_type = 'resource'; CREATE TABLE llx_advtargetemailing (