From 386597e2353bb1a570a9529c7d40d2a1db9dfee3 Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Tue, 14 Apr 2015 17:09:37 -0700 Subject: [PATCH] CRM-16289 - Upgrade fix for log_civicrm_case.case_type_id. ---------------------------------------- * CRM-16289: Remove special characters from log_civicrm_case.case_type_id data during upgrade https://issues.civicrm.org/jira/browse/CRM-16289 --- CRM/Upgrade/Incremental/php/FourSix.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CRM/Upgrade/Incremental/php/FourSix.php b/CRM/Upgrade/Incremental/php/FourSix.php index e3e2163bba..6022fe6dba 100644 --- a/CRM/Upgrade/Incremental/php/FourSix.php +++ b/CRM/Upgrade/Incremental/php/FourSix.php @@ -191,8 +191,8 @@ class CRM_Upgrade_Incremental_php_FourSix { // CRM-16289 - Fix invalid data in log_civicrm_case.case_type_id. $this->addTask(ts('Cleanup case type id data in log table.'), 'fixCaseLog'); } - - /** + + /** * Remove special characters from case_type_id column in log_civicrm_case. * * CRM-16289 - If logging enabled and upgrading from 4.4 or earlier, log_civicrm_case.case_type_id will contain special characters. @@ -207,7 +207,7 @@ class CRM_Upgrade_Incremental_php_FourSix { $res = CRM_Core_DAO::singleValueQuery($sql); if ($res) { - // executeQuery doesn't like running multiple engine changes in one pass, so have to break it up. dgg + // executeQuery doesn't like running multiple engine changes in one pass, so have to break it up. dgg $query = "ALTER TABLE `log_civicrm_case` ENGINE = InnoDB;"; CRM_Core_DAO::executeQuery($query); $query = "UPDATE log_civicrm_case SET case_type_id = replace(case_type_id, 0x01, '');"; @@ -215,8 +215,9 @@ class CRM_Upgrade_Incremental_php_FourSix { $query = "ALTER TABLE `log_civicrm_case` ENGINE = ARCHIVE;"; CRM_Core_DAO::executeQuery($query); $query = "ALTER TABLE log_civicrm_case MODIFY `case_type_id` int(10) unsigned DEFAULT NULL COMMENT 'FK to civicrm_case_type.id';"; - CRM_Core_DAO::executeQuery($query); + CRM_Core_DAO::executeQuery($query); } return TRUE; } + } -- 2.25.1