diff --git a/include/upgrader/sql/c00511c7-7be60a84.patch.sql b/include/upgrader/sql/c00511c7-7be60a84.patch.sql index fdefd09bea960de619fc5a1feac8bd69d3c77b8e..80e652cc7a91d3cc7a90f18c4059343651d49099 100644 --- a/include/upgrader/sql/c00511c7-7be60a84.patch.sql +++ b/include/upgrader/sql/c00511c7-7be60a84.patch.sql @@ -68,6 +68,10 @@ ALTER TABLE `%TABLE_PREFIX%config` ADD `show_related_tickets` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' AFTER `auto_assign_reopened_tickets`, ADD `schema_signature` CHAR( 32 ) NOT NULL AFTER `ostversion`; +-- copy over timezone id - based on offset. +UPDATE `%TABLE_PREFIX%config` SET default_timezone_id = + (SELECT id FROM `%TABLE_PREFIX%timezone` WHERE offset = `%TABLE_PREFIX%config`.timezone_offset); + ALTER TABLE `%TABLE_PREFIX%staff` ADD `passwdreset` DATETIME NULL DEFAULT NULL AFTER `lastlogin`; @@ -145,8 +149,8 @@ ALTER TABLE `%TABLE_PREFIX%email_template` ADD `transfer_alert_subj` VARCHAR( 255 ) NOT NULL AFTER `assigned_alert_body`, ADD `transfer_alert_body` TEXT NOT NULL AFTER `transfer_alert_subj`; --- Insert default text for the new messaage tpl (all records are updated). -UPDATE `%TABLE_PREFIX%email_template` SET updated=NOW() ,transfer_alert_subj='Ticket Transfer #%ticket - %dept',transfer_alert_body='%staff,\r\n\r\nTicket #%ticket has been transferred to %dept department.\r\n\r\n----------------------\r\n\r\n%note\r\n\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%url/scp/ticket.php?id=%id\r\n\r\n- Your friendly Customer Support System - powered by osTicket.'; +-- Insert default text for the new messaage tpl + make templates active (all records are updated). +UPDATE `%TABLE_PREFIX%email_template` SET updated=NOW() ,isactive=1, transfer_alert_subj='Ticket Transfer #%ticket - %dept',transfer_alert_body='%staff,\r\n\r\nTicket #%ticket has been transferred to %dept department.\r\n\r\n----------------------\r\n\r\n%note\r\n\r\n-------------------\r\n\r\nTo view/respond to the ticket, please login to the support ticket system.\r\n\r\n%url/scp/ticket.php?id=%id\r\n\r\n- Your friendly Customer Support System - powered by osTicket.'; ALTER TABLE `%TABLE_PREFIX%help_topic` ADD ispublic TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' AFTER isactive, diff --git a/include/upgrader/sql/f8856d56-abe9c0cb.patch.sql b/include/upgrader/sql/f8856d56-abe9c0cb.patch.sql index c0e5dd298482de89fda33bb04edf011d478f0b4d..e78ab80cc525fac35fc81061bc970ef89dc950f0 100644 --- a/include/upgrader/sql/f8856d56-abe9c0cb.patch.sql +++ b/include/upgrader/sql/f8856d56-abe9c0cb.patch.sql @@ -92,7 +92,7 @@ INSERT INTO `%TABLE_PREFIX%ticket_email_info` AND `thread_type` = 'M' ), `messageId`, `headers` FROM `%TABLE_PREFIX%ticket_message` - WHERE `messageId` IS NOT NULL; + WHERE `messageId` IS NOT NULL AND `messageId` <>''; -- Update attachment table UPDATE `%TABLE_PREFIX%ticket_attachment`