Merge pull request #4054 from eileenmcnaughton/CRM-15237
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 2.2.1.mysql.tpl
CommitLineData
6a488035
TO
1-- CRM-4257
2
3SELECT @og_id_pl := max(id) from civicrm_option_group where name = 'participant_listing';
4
5DELETE FROM `civicrm_option_value` WHERE `option_group_id` = @og_id_pl;
6
7 {if $multilingual}
8 INSERT INTO civicrm_option_value
9 (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, filter, weight, is_reserved, is_active) VALUES
10 (@og_id_pl, {foreach from=$locales item=locale}'Name Only', 'CRM_Event_Page_ParticipantListing_Name',{/foreach} 1, 'Name Only', 0, 1, 1, 1),
11 (@og_id_pl, {foreach from=$locales item=locale}'Name and Email', 'CRM_Event_Page_ParticipantListing_NameAndEmail',{/foreach} 2, 'Name and Email', 0, 2, 1, 1),
12 (@og_id_pl, {foreach from=$locales item=locale}'Name, Status and Register Date', 'CRM_Event_Page_ParticipantListing_NameStatusAndDate',{/foreach} 3, 'Name, Status and Register Date', 0, 3, 1, 1);
13
14 {else}
10824d34 15 INSERT INTO `civicrm_option_value`
16 (`option_group_id`, `label`, `value`, `name`, `filter`, `weight`, `description`, `is_reserved`, `is_active`) VALUES
6a488035
TO
17 (@og_id_pl, 'Name Only', 1, 'Name Only', 0, 1, 'CRM_Event_Page_ParticipantListing_Name', 1, 1),
18 (@og_id_pl, 'Name and Email', 2, 'Name and Email', 0, 2, 'CRM_Event_Page_ParticipantListing_NameAndEmail', 1, 1),
19 (@og_id_pl, 'Name, Status and Register Date', 3, 'Name, Status and Register Date', 0, 3, 'CRM_Event_Page_ParticipantListing_NameStatusAndDate', 1, 1);
20 {/if}
10824d34 21
6a488035 22--CRM-4256
10824d34 23-- Update table name in civicrm_price_set_entity (Price Set)
24
6a488035 25UPDATE `civicrm_price_set_entity` c SET c.`entity_table`='civicrm_event' WHERE c.`entity_table`='civicrm_event_page';
10824d34 26
6a488035
TO
27--Adding new custom search for Contribution Amounts by Tag.
28
29SELECT @og_id_cs := id FROM civicrm_option_group WHERE name = 'custom_search';
30SELECT @maxValue := max(CAST( `value` AS UNSIGNED )) FROM civicrm_option_value WHERE option_group_id = @og_id_cs;
10824d34 31
6a488035
TO
32 {if $multilingual}
33 INSERT INTO civicrm_option_value
34 (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, weight, is_active) VALUES
35 (@og_id_cs, {foreach from=$locales item=locale}'CRM_Contact_Form_Search_Custom_TagContributions', 'Find Contribution Amounts by Tag', {/foreach} @maxValue + 1, 'CRM_Contact_Form_Search_Custom_TagContributions', @maxValue + 1, 1);
36 {else}
37 INSERT INTO civicrm_option_value
10824d34 38 (option_group_id, label, value, name, description, weight, is_active ) VALUES
39 (@og_id_cs, 'CRM_Contact_Form_Search_Custom_TagContributions', @maxValue + 1, 'CRM_Contact_Form_Search_Custom_TagContributions', 'Find Contribution Amounts by Tag', @maxValue + 1, 1);
6a488035 40 {/if}