1/**
2 * @version v1.7 RC4
3 * @signature 9f3b454c06dfd5ee96003eae5182ac13
4 *
5 *  - Supports starts- and ends-with in ticket filter rules
6 *  - Fix assigned template variable
7 *  - Allow nested templates to have duplicate names
8 *  - New permission settings for API key  & groups
9 */
10
11ALTER TABLE  `%TABLE_PREFIX%filter_rule` CHANGE  `how`  `how` ENUM(  'equal',
12    'not_equal',  'contains',  'dn_contain',  'starts',  'ends' );
13
14-- templates -> %message
15UPDATE `%TABLE_PREFIX%email_template`
16    SET `assigned_alert_body` = REPLACE(`assigned_alert_body`, '%message', '%{comments}');
17
18-- API Access.
19ALTER TABLE  `%TABLE_PREFIX%api_key`
20    CHANGE  `isactive`  `isactive` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT  '1',
21    ADD  `can_create_tickets` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT  '1' AFTER  `apikey`,
22    DROP INDEX  `ipaddr`,
23    ADD INDEX  `ipaddr` (  `ipaddr` );
24
25-- Help topics
26ALTER TABLE  `%TABLE_PREFIX%help_topic`
27    DROP INDEX  `topic` ,
28    ADD UNIQUE  `topic` (  `topic` ,  `topic_pid` );
29
30
31-- group settings.
32ALTER TABLE  `%TABLE_PREFIX%groups`
33    ADD  `can_post_ticket_reply` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT  '1' AFTER  `can_transfer_tickets` ,
34    ADD  `can_view_staff_stats` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT  '0' AFTER  `can_post_ticket_reply`;
35
36-- update schema signature.
37UPDATE `%TABLE_PREFIX%config`
38    SET `schema_signature`='9f3b454c06dfd5ee96003eae5182ac13';
39