diff --git a/include/upgrader/streams/core.sig b/include/upgrader/streams/core.sig index e230066fc926efff6cc2f3d2a6b1e5aaff024f27..267cb8e334b83f11d55b2e6341254bc297b0f766 100644 --- a/include/upgrader/streams/core.sig +++ b/include/upgrader/streams/core.sig @@ -1 +1 @@ -0217a4299f37124fb4fb352635bae1b4 +9ef33a062ca3a20190dfad594d594a69 diff --git a/include/upgrader/streams/core/4323a6a8-9ef33a06.patch.sql b/include/upgrader/streams/core/4323a6a8-9ef33a06.patch.sql new file mode 100644 index 0000000000000000000000000000000000000000..9867ef23cb3e7a72b141aa6d56276b3a8d2d8c2d --- /dev/null +++ b/include/upgrader/streams/core/4323a6a8-9ef33a06.patch.sql @@ -0,0 +1,41 @@ +/** + * @version v1.8.2 + * @signature 9ef33a062ca3a20190dfad594d594a69 + * @title Add organization features + * + */ + +ALTER TABLE `%TABLE_PREFIX%form` + CHANGE `type` `type` varchar(8) NOT NULL DEFAULT 'G'; + +ALTER TABLE `%TABLE_PREFIX%list_items` + ADD `status` int(11) unsigned NOT NULL DEFAULT 1 AFTER `list_id`, + ADD `properties` text AFTER `sort`; + +ALTER TABLE `%TABLE_PREFIX%organization` + ADD `status` int(11) NOT NULL DEFAULT 0 AFTER `staff_id`, + ADD `domain` varchar(128) NOT NULL DEFAULT '' AFTER `status`, + ADD `extra` text AFTER `domain`; + +ALTER TABLE `%TABLE_PREFIX%filter` + ADD `status` int(11) unsigned NOT NULL DEFAULT '0' AFTER `isactive`, + ADD `ext_id` varchar(11) AFTER `topic_id`; + +DROP TABLE IF EXISTS `%TABLE_PREFIX%note`; +CREATE TABLE `%TABLE_PREFIX%note` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `pid` int(11) unsigned, + `staff_id` int(11) unsigned NOT NULL DEFAULT 0, + `ext_id` varchar(10), + `body` text, + `status` int(11) unsigned NOT NULL DEFAULT 0, + `sort` int(11) unsigned NOT NULL DEFAULT 0, + `created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) DEFAULT CHARSET=utf8; + +-- Finished with patch +UPDATE `%TABLE_PREFIX%config` + SET `value` = '9ef33a062ca3a20190dfad594d594a69' + WHERE `key` = 'schema_signature' AND `namespace` = 'core'; diff --git a/include/upgrader/streams/core/f5692e24-0217a429.patch.sql b/include/upgrader/streams/core/f5692e24-4323a6a8.patch.sql similarity index 94% rename from include/upgrader/streams/core/f5692e24-0217a429.patch.sql rename to include/upgrader/streams/core/f5692e24-4323a6a8.patch.sql index 8625f64cacec6faedf48a4059e94273bff2c9142..c3bc8ccc3a34347bd98745a7cd3eab026d9996a0 100644 --- a/include/upgrader/streams/core/f5692e24-0217a429.patch.sql +++ b/include/upgrader/streams/core/f5692e24-4323a6a8.patch.sql @@ -1,6 +1,6 @@ /** * @version v1.8.2 - * @signature 0217a4299f37124fb4fb352635bae1b4 + * @signature 4323a6a81c35efbf7722b7fc4e475440 * @title Add client login feature * */ @@ -116,13 +116,7 @@ UPDATE `%TABLE_PREFIX%content` SET `content_id` = LAST_INSERT_ID() DELETE FROM `%TABLE_PREFIX%email_template` WHERE `code_name` IN ('staff.pwreset', 'user.accesslink'); -ALTER TABLE `%TABLE_PREFIX%form` - CHANGE `type` `type` varchar(8) NOT NULL DEFAULT 'G'; - -ALTER TABLE `%TABLE_PREFIX%list_items` - ADD `properties` text AFTER `sort`; - -- Finished with patch UPDATE `%TABLE_PREFIX%config` - SET `value` = '0217a4299f37124fb4fb352635bae1b4' + SET `value` = '4323a6a81c35efbf7722b7fc4e475440' WHERE `key` = 'schema_signature' AND `namespace` = 'core'; diff --git a/include/upgrader/streams/core/f5692e24-0217a429.task.sql b/include/upgrader/streams/core/f5692e24-4323a6a8.task.php similarity index 100% rename from include/upgrader/streams/core/f5692e24-0217a429.task.sql rename to include/upgrader/streams/core/f5692e24-4323a6a8.task.php diff --git a/setup/inc/streams/core/install-mysql.sql b/setup/inc/streams/core/install-mysql.sql index e330bf7fffb207e3c393caeaceb56a2e0a18d684..acd48f9bb4cc395860fb93293a6b6e470d2ed2e8 100644 --- a/setup/inc/streams/core/install-mysql.sql +++ b/setup/inc/streams/core/install-mysql.sql @@ -163,6 +163,7 @@ DROP TABLE IF EXISTS `%TABLE_PREFIX%list_items`; CREATE TABLE `%TABLE_PREFIX%list_items` ( `id` int(11) unsigned NOT NULL auto_increment, `list_id` int(11), + `status` int(11) unsigned NOT NULL DEFAULT 1, `value` varchar(255) NOT NULL, -- extra value such as abbreviation `extra` varchar(255), @@ -269,6 +270,7 @@ CREATE TABLE `%TABLE_PREFIX%filter` ( `id` int(11) unsigned NOT NULL auto_increment, `execorder` int(10) unsigned NOT NULL default '99', `isactive` tinyint(1) unsigned NOT NULL default '1', + `status` int(11) unsigned NOT NULL DEFAULT '0', `match_all_rules` tinyint(1) unsigned NOT NULL default '0', `stop_onmatch` tinyint(1) unsigned NOT NULL default '0', `reject_ticket` tinyint(1) unsigned NOT NULL default '0', @@ -283,6 +285,7 @@ CREATE TABLE `%TABLE_PREFIX%filter` ( `sla_id` int(10) unsigned NOT NULL default '0', `form_id` int(11) unsigned NOT NULL default '0', `topic_id` int(11) unsigned NOT NULL default '0', + `ext_id` varchar(11), `target` ENUM( 'Any', 'Web', 'Email', 'API' ) NOT NULL DEFAULT 'Any', `name` varchar(32) NOT NULL default '', `notes` text, @@ -427,6 +430,9 @@ CREATE TABLE `%TABLE_PREFIX%organization` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(128) NOT NULL DEFAULT '', `staff_id` int(10) unsigned NOT NULL DEFAULT '0', + `status` int(11) unsigned NOT NULL DEFAULT '0', + `domain` varchar(128) NOT NULL DEFAULT '', + `extra` text, `created` timestamp NULL DEFAULT NULL, `updated` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) @@ -449,6 +455,20 @@ CREATE TABLE `%TABLE_PREFIX%canned_response` ( KEY `active` (`isenabled`) ) DEFAULT CHARSET=utf8; +DROP TABLE IF EXISTS `%TABLE_PREFIX%note`; +CREATE TABLE `%TABLE_PREFIX%note` ( + `id` int(11) unsigned NOT NULL AUTO_INCREMENT, + `pid` int(11) unsigned, + `staff_id` int(11) unsigned NOT NULL DEFAULT 0, + `ext_id` varchar(10), + `body` text, + `status` int(11) unsigned NOT NULL DEFAULT 0, + `sort` int(11) unsigned NOT NULL DEFAULT 0, + `created` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', + `updated` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP, + PRIMARY KEY (`id`) +) DEFAULT CHARSET=utf8; + DROP TABLE IF EXISTS `%TABLE_PREFIX%session`; CREATE TABLE `%TABLE_PREFIX%session` ( `session_id` varchar(255) collate ascii_general_ci NOT NULL default '',