1/**
2* @signature cce1ba439ea7e50fcb845fd067779088
3* @version v1.11.0
4* @title Archive Departments and Help Topics
5*
6* This patch replaces the isactive field on Help Topics with using the flags field to add a new status called 'archived'.
7* It also adds a status field to Departments, allowing Agents to activate, disable, and archive Departments
8* through using the flags field
9*
10* Finally, a flag field is added to the filter table
11*/
12-- Help Topics
13UPDATE `%TABLE_PREFIX%help_topic`
14     SET `flags` = `flags` + 2
15     WHERE `isactive` = 1;
16
17ALTER TABLE `%TABLE_PREFIX%help_topic`
18  DROP COLUMN `isactive`;
19
20-- Departments
21UPDATE `%TABLE_PREFIX%department`
22    SET `flags` = `flags` + 4
23    WHERE `ispublic` = 1;
24
25-- Ticket Filters
26ALTER TABLE `%TABLE_PREFIX%filter`
27    ADD `flags` int(10) unsigned DEFAULT '0' AFTER  `isactive`;
28
29 -- Finished with patch
30UPDATE `%TABLE_PREFIX%config`
31    SET `value` = 'cce1ba439ea7e50fcb845fd067779088'
32    WHERE `key` = 'schema_signature' AND `namespace` = 'core';
33