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

Refactor DB schema signature

parent eec02215
No related branches found
No related tags found
No related merge requests found
/**
* @version v1.7 RC4
* @signature c2a64ea46d1fb749f5d908820bb813a0
* @signature 9f3b454c06dfd5ee96003eae5182ac13
*
* - Supports starts- and ends-with in ticket filter rules
* - Fix assigned template variable
* - Allow nested templates to have duplicate names
* - New permission settings for API key & groups
*/
ALTER TABLE `%TABLE_PREFIX%filter_rule` CHANGE `how` `how` ENUM( 'equal',
'not_equal', 'contains', 'dn_contain', 'starts', 'ends' );
-- %message
-- templates -> %message
UPDATE `%TABLE_PREFIX%email_template`
SET `assigned_alert_body` = REPLACE(`assigned_alert_body`, '%message', '%{comments}');
-- API Access.
ALTER TABLE `%TABLE_PREFIX%api_key`
CHANGE `isactive` `isactive` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1',
ADD `can_create_tickets` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `apikey`,
DROP INDEX `ipaddr`,
ADD INDEX `ipaddr` ( `ipaddr` );
-- Help topics
ALTER TABLE `%TABLE_PREFIX%help_topic`
DROP INDEX `topic` ,
ADD UNIQUE `topic` ( `topic` , `topic_pid` );
-- group settings.
ALTER TABLE `%TABLE_PREFIX%groups`
ADD `can_post_ticket_reply` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `can_transfer_tickets` ,
ADD `can_view_staff_stats` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0' AFTER `can_post_ticket_reply`;
-- update schema signature.
UPDATE `%TABLE_PREFIX%config`
SET `schema_signature`='c2a64ea46d1fb749f5d908820bb813a0';
SET `schema_signature`='9f3b454c06dfd5ee96003eae5182ac13';
......@@ -63,7 +63,7 @@
#Current version && schema signature (Changes from version to version)
define('THIS_VERSION','1.7-RC3+'); //Shown on admin panel
define('SCHEMA_SIGNATURE','00ff231f2ade8797a0e7f2a7fccd52f4'); //MD5 signature of the db schema. (used to trigger upgrades)
define('SCHEMA_SIGNATURE','9f3b454c06dfd5ee96003eae5182ac13'); //MD5 signature of the db schema. (used to trigger upgrades)
#load config info
$configfile='';
if(file_exists(ROOT_DIR.'ostconfig.php')) //Old installs prior to v 1.6 RC5
......
......@@ -5,11 +5,12 @@ CREATE TABLE `%TABLE_PREFIX%api_key` (
`isactive` tinyint(1) NOT NULL default '1',
`ipaddr` varchar(64) NOT NULL,
`apikey` varchar(255) NOT NULL,
`can_create_tickets` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1',
`notes` text,
`updated` datetime NOT NULL,
`created` datetime NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `ipaddr` (`ipaddr`),
KEY `ipaddr` (`ipaddr`),
UNIQUE KEY `apikey` (`apikey`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
......@@ -133,7 +134,7 @@ CREATE TABLE `%TABLE_PREFIX%config` (
`assigned_alert_team_members` tinyint(1) unsigned NOT NULL default '0',
`auto_assign_reopened_tickets` tinyint(1) unsigned NOT NULL default '1',
`show_related_tickets` tinyint(1) unsigned NOT NULL default '1',
`show_assigned_tickets` tinyint(1) unsigned NOT NULL default '0',
`show_assigned_tickets` tinyint(1) unsigned NOT NULL default '1',
`show_answered_tickets` tinyint(1) unsigned NOT NULL default '0',
`show_notes_inline` tinyint(1) unsigned NOT NULL default '1',
`hide_staff_name` tinyint(1) unsigned NOT NULL default '0',
......@@ -355,6 +356,7 @@ CREATE TABLE `%TABLE_PREFIX%groups` (
`group_name` varchar(50) NOT NULL default '',
`can_create_tickets` tinyint(1) unsigned NOT NULL default '1',
`can_edit_tickets` tinyint(1) unsigned NOT NULL default '1',
`can_post_ticket_reply` tinyint( 1 ) unsigned NOT NULL DEFAULT '1',
`can_delete_tickets` tinyint(1) unsigned NOT NULL default '0',
`can_close_tickets` tinyint(1) unsigned NOT NULL default '1',
`can_assign_tickets` tinyint(1) unsigned NOT NULL default '1',
......@@ -362,6 +364,7 @@ CREATE TABLE `%TABLE_PREFIX%groups` (
`can_ban_emails` tinyint(1) unsigned NOT NULL default '0',
`can_manage_premade` tinyint(1) unsigned NOT NULL default '0',
`can_manage_faq` tinyint(1) unsigned NOT NULL default '0',
`can_view_staff_stats` tinyint( 1 ) unsigned NOT NULL DEFAULT '0',
`notes` text,
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
......@@ -402,7 +405,7 @@ CREATE TABLE `%TABLE_PREFIX%help_topic` (
`created` datetime NOT NULL,
`updated` datetime NOT NULL,
PRIMARY KEY (`topic_id`),
UNIQUE KEY `topic` (`topic`),
UNIQUE KEY `topic` ( `topic` , `topic_pid` ),
KEY `topic_pid` (`topic_pid`),
KEY `priority_id` (`priority_id`),
KEY `dept_id` (`dept_id`),
......
c2a64ea46d1fb749f5d908820bb813a0
9f3b454c06dfd5ee96003eae5182ac13
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