Skip to content
Snippets Groups Projects
Commit 558ccc27 authored by lobo's avatar lobo
Browse files

CRM-12151

parent ea7e2156
Branches
No related tags found
No related merge requests found
......@@ -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);
......
-- 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));
......@@ -49,7 +49,7 @@
<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>
......@@ -130,7 +130,7 @@
<table>civicrm_component</table>
<key>id</key>
<add>2.0</add>
</foreignKey>
</foreignKey>
<field>
<name>domain_id</name>
<type>int unsigned</type>
......@@ -151,14 +151,14 @@
</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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment