$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();
$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)) {
}
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);
-- 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));
+
+
<required>true</required>
<comment>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.</comment>
<add>1.5</add>
- <change>3.3</change>
+ <change>3.3</change>
</field>
<field>
<name>name</name>
<table>civicrm_component</table>
<key>id</key>
<add>2.0</add>
- </foreignKey>
+ </foreignKey>
<field>
<name>domain_id</name>
<type>int unsigned</type>
</field>
<index>
<name>index_option_group_id_value</name>
- <fieldName>value</fieldName>
+ <fieldName length="128">value</fieldName>
<fieldName>option_group_id</fieldName>
<add>1.5</add>
</index>
<index>
<name>index_option_group_id_name</name>
+ <fieldName length="128">name</fieldName>
<fieldName>option_group_id</fieldName>
- <fieldName>name</fieldName>
<add>2.2</add>
</index>
</table>