Version to 3.5.1

Compatible with GLPI 9.3
This commit is contained in:
tomolimo
2019-05-21 10:47:15 +02:00
parent 8a711173cc
commit 96c6e9ba6f
43 changed files with 1027 additions and 1669 deletions

View File

@@ -4,27 +4,7 @@ function processmaker_install() {
global $DB;
// installation from scratch
include_once(GLPI_ROOT."/plugins/processmaker/setup.php");
$info = plugin_version_processmaker();
switch ($info['version']) {
case '3.3.0' :
$version = '3.3.0';
break;
case '3.3.1' :
case '3.3.2' :
case '3.3.3' :
case '3.3.4' :
case '3.3.5' :
case '3.3.6' :
case '3.3.7' :
$version = '3.3.1';
break;
case '3.3.8' :
default :
$version = '3.3.8';
break;
}
$DB->runFile(GLPI_ROOT . "/plugins/processmaker/install/mysql/$version-empty.sql");
$DB->runFile(GLPI_ROOT . "/plugins/processmaker/install/mysql/processmaker-empty.sql");
// add configuration singleton
$query = "INSERT INTO `glpi_plugin_processmaker_configs` (`id`) VALUES (1);";

View File

@@ -1,167 +0,0 @@
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
`name` varchar(255) NOT NULL,
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
`sourcetask_guid` varchar(32) DEFAULT NULL,
`targettask_guid` varchar(32) DEFAULT NULL,
`targetprocess_guid` varchar(32) DEFAULT NULL,
`targetdynaform_guid` varchar(32) DEFAULT NULL,
`sourcecondition` text,
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
`externalapplication` text,
`date_mod` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `is_active` (`is_active`),
KEY `is_externaldata` (`is_externaldata`),
KEY `is_self` (`is_self`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
`id` varchar(32) NOT NULL,
`items_id` int(11) NOT NULL,
`itemtype` varchar(10) NOT NULL DEFAULT 'Ticket',
`case_num` int(11) NOT NULL,
`case_status` varchar(20) NOT NULL DEFAULT 'DRAFT',
`processes_id` int(11) DEFAULT NULL,
UNIQUE KEY `items` (`itemtype`,`items_id`),
KEY `case_status` (`case_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
`pm_admin_user` varchar(255) DEFAULT NULL,
`pm_admin_passwd` varchar(255) DEFAULT NULL,
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
`date_mod` timestamp NULL DEFAULT NULL,
`taskcategories_id` int(11) DEFAULT NULL,
`users_id` int(11) DEFAULT NULL,
`pm_group_guid` varchar(32) DEFAULT NULL,
`comment` text,
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
`pm_dbserver_user` varchar(255) DEFAULT NULL,
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
`domain` varchar(50) DEFAULT '',
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
`itemtype` varchar(100) NOT NULL,
`items_id` int(11) NOT NULL DEFAULT '0',
`users_id` int(11) NOT NULL DEFAULT '0',
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
`postdata` mediumtext,
`logs_out` mediumtext,
`state` int(11) NOT NULL,
`date_mod` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`process_guid` varchar(32) NOT NULL,
`name` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
`comment` text,
`taskcategories_id` int(11) DEFAULT NULL,
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for Tickets',
`date_mod` timestamp NULL DEFAULT NULL,
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
PRIMARY KEY (`id`),
UNIQUE KEY `process_guid` (`process_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes_profiles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`processes_id` int(11) NOT NULL DEFAULT '0',
`profiles_id` int(11) NOT NULL DEFAULT '0',
`entities_id` int(11) NOT NULL DEFAULT '0',
`is_recursive` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `entities_id` (`entities_id`),
KEY `profiles_id` (`profiles_id`),
KEY `processes_id` (`processes_id`),
KEY `is_recursive` (`is_recursive`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_taskcategories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`processes_id` int(11) NOT NULL,
`pm_task_guid` varchar(32) NOT NULL,
`taskcategories_id` int(11) NOT NULL,
`start` bit(1) NOT NULL DEFAULT b'0',
`is_active` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `pm_task_guid` (`pm_task_guid`),
UNIQUE KEY `items` (`taskcategories_id`),
KEY `processes_id` (`processes_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`items_id` int(11) NOT NULL,
`itemtype` varchar(32) NOT NULL,
`case_id` varchar(32) NOT NULL,
`del_index` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `case_id` (`case_id`,`del_index`),
UNIQUE KEY `items` (`itemtype`,`items_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pm_users_id` varchar(32) NOT NULL,
`password` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `pm_users_id` (`pm_users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

View File

@@ -1,168 +0,0 @@
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
`name` varchar(255) NOT NULL,
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
`sourcetask_guid` varchar(32) DEFAULT NULL,
`targettask_guid` varchar(32) DEFAULT NULL,
`targetprocess_guid` varchar(32) DEFAULT NULL,
`targetdynaform_guid` varchar(32) DEFAULT NULL,
`sourcecondition` text,
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
`externalapplication` text,
`date_mod` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `is_active` (`is_active`),
KEY `is_externaldata` (`is_externaldata`),
KEY `is_self` (`is_self`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
`id` varchar(32) NOT NULL,
`items_id` int(11) NOT NULL,
`itemtype` varchar(10) NOT NULL DEFAULT 'Ticket',
`case_num` int(11) NOT NULL,
`case_status` varchar(20) NOT NULL DEFAULT 'DRAFT',
`processes_id` int(11) DEFAULT NULL,
UNIQUE KEY `items` (`itemtype`,`items_id`),
KEY `case_status` (`case_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
`pm_admin_user` varchar(255) DEFAULT NULL,
`pm_admin_passwd` varchar(255) DEFAULT NULL,
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
`date_mod` timestamp NULL DEFAULT NULL,
`taskcategories_id` int(11) DEFAULT NULL,
`users_id` int(11) DEFAULT NULL,
`pm_group_guid` varchar(32) DEFAULT NULL,
`comment` text,
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
`pm_dbserver_user` varchar(255) DEFAULT NULL,
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
`domain` varchar(50) DEFAULT '',
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
`db_version` varchar(10) NOT NULL DEFAULT '3.2.9',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
`itemtype` varchar(100) NOT NULL,
`items_id` int(11) NOT NULL DEFAULT '0',
`users_id` int(11) NOT NULL DEFAULT '0',
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
`postdata` mediumtext,
`logs_out` mediumtext,
`state` int(11) NOT NULL,
`date_mod` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`process_guid` varchar(32) NOT NULL,
`name` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
`comment` text,
`taskcategories_id` int(11) DEFAULT NULL,
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for Tickets',
`date_mod` timestamp NULL DEFAULT NULL,
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
PRIMARY KEY (`id`),
UNIQUE KEY `process_guid` (`process_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes_profiles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`processes_id` int(11) NOT NULL DEFAULT '0',
`profiles_id` int(11) NOT NULL DEFAULT '0',
`entities_id` int(11) NOT NULL DEFAULT '0',
`is_recursive` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
KEY `entities_id` (`entities_id`),
KEY `profiles_id` (`profiles_id`),
KEY `processes_id` (`processes_id`),
KEY `is_recursive` (`is_recursive`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_taskcategories` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`processes_id` int(11) NOT NULL,
`pm_task_guid` varchar(32) NOT NULL,
`taskcategories_id` int(11) NOT NULL,
`start` bit(1) NOT NULL DEFAULT b'0',
`is_active` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `pm_task_guid` (`pm_task_guid`),
UNIQUE KEY `items` (`taskcategories_id`),
KEY `processes_id` (`processes_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`items_id` int(11) NOT NULL,
`itemtype` varchar(32) NOT NULL,
`case_id` varchar(32) NOT NULL,
`del_index` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `case_id` (`case_id`,`del_index`),
UNIQUE KEY `items` (`itemtype`,`items_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pm_users_id` varchar(32) NOT NULL,
`password` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `pm_users_id` (`pm_users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

View File

@@ -1,179 +0,0 @@
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
`name` varchar(255) NOT NULL,
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
`sourcetask_guid` varchar(32) DEFAULT NULL,
`targettask_guid` varchar(32) DEFAULT NULL,
`targetprocess_guid` varchar(32) DEFAULT NULL,
`targetdynaform_guid` varchar(32) DEFAULT NULL,
`sourcecondition` text,
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
`externalapplication` text,
`date_mod` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `is_active` (`is_active`),
KEY `is_externaldata` (`is_externaldata`),
KEY `is_self` (`is_self`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
`id` INT(11) NOT NULL,
`itemtype` VARCHAR(10) NOT NULL DEFAULT 'Ticket',
`items_id` INT(11) NOT NULL,
`entities_id` INT(11) NOT NULL DEFAULT '0',
`name` MEDIUMTEXT NOT NULL DEFAULT '',
`case_guid` VARCHAR(32) NOT NULL,
`case_status` VARCHAR(20) NOT NULL DEFAULT 'DRAFT',
`plugin_processmaker_processes_id` INT(11) NULL DEFAULT NULL,
`plugin_processmaker_cases_id` INT(11) NULL DEFAULT NULL,
INDEX `items` (`itemtype`, `items_id`),
INDEX `case_status` (`case_status`),
PRIMARY KEY (`id`),
UNIQUE INDEX `case_guid` (`case_guid`),
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
INDEX `plugin_processmaker_cases_id` (`plugin_processmaker_cases_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
`pm_admin_user` varchar(255) DEFAULT NULL,
`pm_admin_passwd` varchar(255) DEFAULT NULL,
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
`date_mod` timestamp NULL DEFAULT NULL,
`taskcategories_id` int(11) DEFAULT NULL,
`users_id` int(11) DEFAULT NULL,
`pm_group_guid` varchar(32) DEFAULT NULL,
`comment` text,
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
`pm_dbserver_user` varchar(255) DEFAULT NULL,
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
`domain` varchar(50) DEFAULT '',
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
`db_version` varchar(10) NOT NULL DEFAULT '3.3.0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
`plugin_processmaker_cases_id` int(11) DEFAULT '0',
`users_id` int(11) NOT NULL DEFAULT '0',
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
`postdata` mediumtext,
`logs_out` mediumtext,
`state` int(11) NOT NULL,
`date_mod` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`process_guid` varchar(32) NOT NULL,
`name` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
`comment` text,
`taskcategories_id` int(11) DEFAULT NULL,
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for Tickets',
`date_mod` timestamp NULL DEFAULT NULL,
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
PRIMARY KEY (`id`),
UNIQUE KEY `process_guid` (`process_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
CREATE TABLE `glpi_plugin_processmaker_processes_profiles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_processes_id` int(11) NOT NULL,
`profiles_id` int(11) NOT NULL,
`entities_id` int(11) NOT NULL,
`is_recursive` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `plugin_processmaker_processes_id_profiles_id_entities_id` (`plugin_processmaker_processes_id`, `profiles_id`, `entities_id`),
KEY `entities_id` (`entities_id`),
KEY `profiles_id` (`profiles_id`),
KEY `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
KEY `is_recursive` (`is_recursive`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
CREATE TABLE `glpi_plugin_processmaker_taskcategories` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_processes_id` INT(11) NOT NULL,
`pm_task_guid` VARCHAR(32) NOT NULL,
`taskcategories_id` INT(11) NOT NULL,
`is_start` TINYINT(1) NOT NULL DEFAULT '0',
`is_active` TINYINT(1) NOT NULL DEFAULT '1',
`is_subprocess` TINYINT(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE INDEX `pm_task_guid` (`pm_task_guid`),
UNIQUE INDEX `items` (`taskcategories_id`),
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`items_id` int(11) NOT NULL,
`itemtype` varchar(32) NOT NULL,
`plugin_processmaker_cases_id` int(11) NOT NULL,
`plugin_processmaker_taskcategories_id` int(11) NOT NULL,
`del_index` int(11) NOT NULL,
`del_thread` INT(11) NOT NULL,
`del_thread_status` varchar(32) NOT NULL DEFAULT 'OPEN',
PRIMARY KEY (`id`),
UNIQUE KEY `tasks` (`plugin_processmaker_cases_id`,`del_index`),
UNIQUE KEY `items` (`itemtype`,`items_id`),
KEY `del_thread_status` (`del_thread_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pm_users_id` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `pm_users_id` (`pm_users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

View File

@@ -1,186 +0,0 @@
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinkactions
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinkactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
`name` varchar(255) NOT NULL,
`value` text,
PRIMARY KEY (`id`),
UNIQUE KEY `caselinks_id_name` (`plugin_processmaker_caselinks_id`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_caselinks
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_caselinks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`is_externaldata` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:insert data from case,1:wait for external application to set datas',
`is_self` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:use linked tickets, 1:use self',
`sourcetask_guid` varchar(32) DEFAULT NULL,
`targettask_guid` varchar(32) DEFAULT NULL,
`targetprocess_guid` varchar(32) DEFAULT NULL,
`targetdynaform_guid` varchar(32) DEFAULT NULL,
`sourcecondition` text,
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
`is_targettoreassign` TINYINT(1) NOT NULL DEFAULT '0',
`is_targettoimpersonate` TINYINT(1) NOT NULL DEFAULT '0',
`externalapplication` TEXT NULL,
`is_synchronous` TINYINT(1) NOT NULL DEFAULT '0',
`date_mod` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `is_active` (`is_active`),
KEY `is_externaldata` (`is_externaldata`),
KEY `is_self` (`is_self`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_cases
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
`id` INT(11) NOT NULL,
`itemtype` VARCHAR(10) NOT NULL DEFAULT 'Ticket',
`items_id` INT(11) NOT NULL,
`entities_id` INT(11) NOT NULL DEFAULT '0',
`name` MEDIUMTEXT NOT NULL DEFAULT '',
`case_guid` VARCHAR(32) NOT NULL,
`case_status` VARCHAR(20) NOT NULL DEFAULT 'DRAFT',
`plugin_processmaker_processes_id` INT(11) NULL DEFAULT NULL,
`plugin_processmaker_cases_id` INT(11) NULL DEFAULT NULL,
INDEX `items` (`itemtype`, `items_id`),
INDEX `case_status` (`case_status`),
PRIMARY KEY (`id`),
UNIQUE INDEX `case_guid` (`case_guid`),
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
INDEX `plugin_processmaker_cases_id` (`plugin_processmaker_cases_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_configs
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
`pm_admin_user` varchar(255) DEFAULT NULL,
`pm_admin_passwd` varchar(255) DEFAULT NULL,
`pm_theme` varchar(50) NOT NULL DEFAULT 'glpi_classic',
`date_mod` timestamp NULL DEFAULT NULL,
`taskcategories_id` int(11) DEFAULT NULL,
`users_id` int(11) DEFAULT NULL,
`pm_group_guid` varchar(32) DEFAULT NULL,
`comment` text,
`pm_dbserver_name` varchar(255) DEFAULT 'localhost',
`pm_dbname` varchar(50) DEFAULT 'wf_workflow',
`pm_dbserver_user` varchar(255) DEFAULT NULL,
`pm_dbserver_passwd` varchar(255) DEFAULT NULL,
`domain` varchar(50) DEFAULT '',
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
`db_version` varchar(10) NOT NULL DEFAULT '3.3.0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_crontaskactions
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_crontaskactions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_caselinks_id` int(11) DEFAULT NULL,
`plugin_processmaker_cases_id` int(11) DEFAULT '0',
`users_id` int(11) NOT NULL DEFAULT '0',
`is_targettoclaim` tinyint(1) NOT NULL DEFAULT '0',
`postdata` mediumtext,
`logs_out` mediumtext,
`state` int(11) NOT NULL,
`date_mod` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`process_guid` varchar(32) NOT NULL,
`name` varchar(255) NOT NULL,
`is_active` tinyint(1) NOT NULL DEFAULT '0',
`hide_case_num_title` tinyint(1) NOT NULL DEFAULT '0',
`insert_task_comment` tinyint(1) NOT NULL DEFAULT '0',
`comment` text,
`taskcategories_id` int(11) DEFAULT NULL,
`itilcategories_id` int(11) NOT NULL DEFAULT '0',
`type` int(11) NOT NULL DEFAULT '1' COMMENT 'Only used for self-service Tickets',
`date_mod` timestamp NULL DEFAULT NULL,
`project_type` varchar(50) NOT NULL DEFAULT 'classic',
`is_change` tinyint(1) NOT NULL DEFAULT '0',
`is_problem` tinyint(1) NOT NULL DEFAULT '0',
`is_incident` tinyint(1) NOT NULL DEFAULT '0',
`is_request` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `process_guid` (`process_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_processes_profiles
CREATE TABLE `glpi_plugin_processmaker_processes_profiles` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_processes_id` int(11) NOT NULL,
`profiles_id` int(11) NOT NULL,
`entities_id` int(11) NOT NULL,
`is_recursive` tinyint(1) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE INDEX `plugin_processmaker_processes_id_profiles_id_entities_id` (`plugin_processmaker_processes_id`, `profiles_id`, `entities_id`),
KEY `entities_id` (`entities_id`),
KEY `profiles_id` (`profiles_id`),
KEY `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`),
KEY `is_recursive` (`is_recursive`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;
-- Dumping structure for table glpi.glpi_plugin_processmaker_taskcategories
CREATE TABLE `glpi_plugin_processmaker_taskcategories` (
`id` INT(11) NOT NULL AUTO_INCREMENT,
`plugin_processmaker_processes_id` INT(11) NOT NULL,
`pm_task_guid` VARCHAR(32) NOT NULL,
`taskcategories_id` INT(11) NOT NULL,
`is_start` TINYINT(1) NOT NULL DEFAULT '0',
`is_active` TINYINT(1) NOT NULL DEFAULT '1',
`is_subprocess` TINYINT(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE INDEX `pm_task_guid` (`pm_task_guid`),
UNIQUE INDEX `items` (`taskcategories_id`),
INDEX `plugin_processmaker_processes_id` (`plugin_processmaker_processes_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_tasks
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_tasks` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`items_id` int(11) NOT NULL,
`itemtype` varchar(32) NOT NULL,
`plugin_processmaker_cases_id` int(11) NOT NULL,
`plugin_processmaker_taskcategories_id` int(11) NOT NULL,
`del_index` int(11) NOT NULL,
`del_thread` INT(11) NOT NULL,
`del_thread_status` varchar(32) NOT NULL DEFAULT 'OPEN',
PRIMARY KEY (`id`),
UNIQUE KEY `tasks` (`plugin_processmaker_cases_id`,`del_index`),
UNIQUE KEY `items` (`itemtype`,`items_id`),
KEY `del_thread_status` (`del_thread_status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- Dumping structure for table glpi.glpi_plugin_processmaker_users
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pm_users_id` varchar(32) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `pm_users_id` (`pm_users_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

View File

@@ -64,7 +64,7 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_cases` (
CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL DEFAULT 'ProcessMaker',
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://localhost/',
`pm_server_URL` varchar(250) NOT NULL DEFAULT 'http://itsm-pm.acme.com/',
`pm_workspace` varchar(50) NOT NULL DEFAULT 'workflow',
`pm_admin_user` varchar(255) DEFAULT NULL,
`pm_admin_passwd` varchar(255) DEFAULT NULL,
@@ -81,7 +81,8 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_configs` (
`domain` varchar(50) DEFAULT '',
`maintenance` tinyint(1) NOT NULL DEFAULT '0',
`ssl_verify` tinyint(1) NOT NULL DEFAULT '0',
`db_version` varchar(10) NOT NULL DEFAULT '3.3.8',
`db_version` varchar(10) NOT NULL DEFAULT '3.4.9',
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
@@ -119,6 +120,8 @@ CREATE TABLE IF NOT EXISTS `glpi_plugin_processmaker_processes` (
`is_problem` tinyint(1) NOT NULL DEFAULT '0',
`is_incident` tinyint(1) NOT NULL DEFAULT '0',
`is_request` tinyint(1) NOT NULL DEFAULT '0',
`maintenance` TINYINT(1) NOT NULL DEFAULT '0',
`max_cases_per_item` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `process_guid` (`process_guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@@ -11,6 +11,9 @@ function processmaker_update() {
include_once(GLPI_ROOT."/plugins/processmaker/inc/config.class.php");
$config = PluginProcessmakerConfig::getInstance();
$current_version = $config->fields['db_version'];
if (empty($current_version)) {
$current_version = '2.4.1';
}
}
switch ($current_version) {
@@ -37,6 +40,10 @@ function processmaker_update() {
// will upgrade 3.3.1 to 3.3.8
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_1_to_3_3_8.php");
$new_version = update_3_3_1_to_3_3_8();
case '3.3.8' :
// will upgrade 3.3.8 to 3.4.9
include_once(GLPI_ROOT."/plugins/processmaker/install/update_3_3_8_to_3_4_9.php");
$new_version = update_3_3_8_to_3_4_9();
}
if (isset($new_version)) {

View File

@@ -1,6 +1,6 @@
<?php
function update_3_3_1_to_3_3_8(){
function update_3_3_1_to_3_3_8() {
global $DB;
// Alter table glpi_plugin_processmaker_configs

View File

@@ -0,0 +1,30 @@
<?php
function update_3_3_8_to_3_4_9() {
global $DB;
// Alter table glpi_plugin_processmaker_configs
if (!$DB->fieldExists("glpi_plugin_processmaker_configs", "max_cases_per_item" )) {
$query = "ALTER TABLE `glpi_plugin_processmaker_configs`
ADD COLUMN `max_cases_per_item` INT(11) NOT NULL DEFAULT '0' AFTER `db_version`;";
$DB->query($query) or die("error adding max_cases_per_item to glpi_plugin_processmaker_configs table" . $DB->error());
}
// Alter table glpi_plugin_processmaker_processes
if (!$DB->fieldExists("glpi_plugin_processmaker_processes", "maintenance" )) {
$query = "ALTER TABLE `glpi_plugin_processmaker_processes`
ADD COLUMN `maintenance` TINYINT(1) NOT NULL DEFAULT '0' AFTER `is_request`;";
$DB->query($query) or die("error adding maintenance to glpi_plugin_processmaker_processes table" . $DB->error());
}
// Alter table glpi_plugin_processmaker_processes
if (!$DB->fieldExists("glpi_plugin_processmaker_processes", "max_cases_per_item" )) {
$query = "ALTER TABLE `glpi_plugin_processmaker_processes`
ADD COLUMN `max_cases_per_item` INT(11) NOT NULL DEFAULT '0' AFTER `maintenance`;";
$DB->query($query) or die("error adding max_cases_per_item to glpi_plugin_processmaker_processes table" . $DB->error());
}
return '3.4.9';
}

View File

@@ -71,7 +71,7 @@ function update_to_3_2_8() {
}
}
if (!$DB->fieldExists('glpi_plugin_processmaker_users', 'password')) {
if (!$DB->fieldExists('glpi_plugin_processmaker_users', 'password') && !$DB->fieldExists('glpi_plugin_processmaker_users', 'id')) {
$query = "ALTER TABLE `glpi_plugin_processmaker_users`
ADD COLUMN `id` INT NOT NULL AUTO_INCREMENT FIRST,
ADD COLUMN `password` VARCHAR(32) NULL DEFAULT NULL AFTER `pm_users_id`,