From: Donald A. Lobo Date: Tue, 19 Mar 2013 15:38:24 +0000 (-0700) Subject: CRM-12151 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=558ccc277728882cf5b4620a6f0d1c4ca9b6cdb0;p=civicrm-core.git CRM-12151 --- diff --git a/CRM/Upgrade/Incremental/php/FourThree.php b/CRM/Upgrade/Incremental/php/FourThree.php index bbe9a35d6e..c1a9c93cfb 100644 --- a/CRM/Upgrade/Incremental/php/FourThree.php +++ b/CRM/Upgrade/Incremental/php/FourThree.php @@ -203,7 +203,11 @@ WHERE entity_value = '' OR entity_value IS NULL $query = "SELECT * FROM civicrm_saved_search WHERE form_values LIKE '%contribution_type%'"; $this->addTask('Replace contribution_type to financial_type in table civicrm_saved_search', 'replaceContributionTypeId', $query, 'savedSearch'); } - + + function upgrade_4_3_beta4($rev) { + $this->addTask(ts('Upgrade DB to 4.3.beta4: SQL'), 'task_4_3_x_runSql', $rev); + } + //CRM-11636 function assignFinancialTypeToPriceRecords() { $upgrade = new CRM_Upgrade_Form(); @@ -732,12 +736,12 @@ AND TABLE_SCHEMA = '{$dbUf['database']}'"; $saveDao = new CRM_Contact_DAO_SavedSearch(); } else { - $saveDao = new CRM_Report_DAO_Instance(); + $saveDao = new CRM_Report_DAO_Instance(); } $saveDao->id = $dao->id; if ($table == 'savedSearch') { - if (array_key_exists('mapper', $formValues)) { + if (array_key_exists('mapper', $formValues)) { foreach ($formValues['mapper'] as $key => $values) { foreach ($values as $k => $v) { if (preg_grep('/contribution_/', $v)) { @@ -758,7 +762,7 @@ AND TABLE_SCHEMA = '{$dbUf['database']}'"; } if (preg_match('/contribution_type/', $dao->where_clause)) { $saveDao->where_clause = preg_replace('/contribution_type/', 'financial_type', $dao->where_clause); - } + } } $saveDao->form_values = serialize($formValues); diff --git a/CRM/Upgrade/Incremental/sql/4.3.beta4.mysql.tpl b/CRM/Upgrade/Incremental/sql/4.3.beta4.mysql.tpl index 7f93e23161..e8fbb154a9 100644 --- a/CRM/Upgrade/Incremental/sql/4.3.beta4.mysql.tpl +++ b/CRM/Upgrade/Incremental/sql/4.3.beta4.mysql.tpl @@ -1,5 +1,15 @@ -- CRM-12142 {if !$multilingual} - ALTER TABLE `civicrm_premiums` - ADD COLUMN premiums_nothankyou_label varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Label displayed for No Thank-you option in premiums block (e.g. No thank you)'; -{/if} \ No newline at end of file + ALTER TABLE `civicrm_premiums` + ADD COLUMN premiums_nothankyou_label varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Label displayed for No Thank-you + option in premiums block (e.g. No thank you)'; +{/if} + +-- CRM-12151 +ALTER TABLE civicrm_option_value + DROP INDEX index_option_group_id_value, + ADD INDEX index_option_group_id_value (value(128), option_group_id), + DROP INDEX index_option_group_id_name, + ADD INDEX index_option_group_id_name (option_group_id, name(128)); + + diff --git a/xml/schema/Core/OptionValue.xml b/xml/schema/Core/OptionValue.xml index 75fb066f0e..2dd7d8a344 100644 --- a/xml/schema/Core/OptionValue.xml +++ b/xml/schema/Core/OptionValue.xml @@ -49,7 +49,7 @@ true The actual value stored (as a foreign key) in the data record. Functions which need lookup option_value.title should use civicrm_option_value.option_group_id plus civicrm_option_value.value as the key. 1.5 - 3.3 + 3.3 name @@ -130,7 +130,7 @@ civicrm_component
id 2.0 - + domain_id int unsigned @@ -151,14 +151,14 @@ index_option_group_id_value - value + value option_group_id 1.5 index_option_group_id_name + name option_group_id - name 2.2