Skip to content
Snippets Groups Projects
Commit 84b9ade8 authored by Peter Rotich's avatar Peter Rotich
Browse files

Add database patch for ticket referral

parent 81edb54e
No related branches found
No related tags found
No related merge requests found
0ca8585781bc6656f3ca008212554441
86707325fc571e56242fccc46fd24466
/**
* @signature 86707325fc571e56242fccc46fd24466
* @version v1.11.0
* @title Add ticket referral
*
* This patch adds a table for thread referral as well as thread event states of reffered and deleted
*/
CREATE TABLE `%TABLE_PREFIX%thread_referral` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`thread_id` int(11) unsigned NOT NULL,
`object_id` int(11) unsigned NOT NULL,
`object_type` char(1) NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ref` (`object_id`,`object_type`,`thread_id`),
KEY `thread_id` (`thread_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
ALTER TABLE `%TABLE_PREFIX%thread_event`
CHANGE `state` `state` enum('created','closed','reopened','assigned','transferred', 'reffered', 'overdue','edited','viewed','error','collab','resent', 'deleted') NOT NULL;
-- Finished with patch
UPDATE `%TABLE_PREFIX%config`
SET `value` = '86707325fc571e56242fccc46fd24466'
WHERE `key` = 'schema_signature' AND `namespace` = 'core';
......@@ -717,7 +717,7 @@ CREATE TABLE `%TABLE_PREFIX%thread_event` (
`team_id` int(11) unsigned NOT NULL,
`dept_id` int(11) unsigned NOT NULL,
`topic_id` int(11) unsigned NOT NULL,
`state` enum('created','closed','reopened','assigned','transferred','overdue','edited','viewed','error','collab','resent') NOT NULL,
`state` enum('created','closed','reopened','assigned','transferred', 'reffered', 'overdue','edited','viewed','error','collab','resent', 'deleted') NOT NULL,
`data` varchar(1024) DEFAULT NULL COMMENT 'Encoded differences',
`username` varchar(128) NOT NULL default 'SYSTEM',
`uid` int(11) unsigned DEFAULT NULL,
......@@ -729,6 +729,19 @@ CREATE TABLE `%TABLE_PREFIX%thread_event` (
KEY `ticket_stats` (`timestamp`, `state`)
) DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%TABLE_PREFIX%thread_referral`;
CREATE TABLE `%TABLE_PREFIX%thread_referral` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`thread_id` int(11) unsigned NOT NULL,
`object_id` int(11) unsigned NOT NULL,
`object_type` char(1) NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ref` (`object_id`,`object_type`,`thread_id`),
KEY `thread_id` (`thread_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
DROP TABLE IF EXISTS `%TABLE_PREFIX%ticket_status`;
CREATE TABLE IF NOT EXISTS `%TABLE_PREFIX%ticket_status` (
`id` int(11) NOT NULL AUTO_INCREMENT,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment