Merge pull request #4054 from eileenmcnaughton/CRM-15237
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 2.2.beta3.mysql.tpl
CommitLineData
6a488035
TO
1-- This file contains upgrade queries for db changes introduced after 2.2.beta2
2
3-- CRM-4167
4
5ALTER TABLE `civicrm_event`
6 ADD `allow_same_participant_emails` tinyint(4) default '0' COMMENT 'if true - allows the user to register multiple registrations from same email address.';
7
8-- CRM-4166
9
10824d34 10INSERT INTO `civicrm_payment_processor_type`
6a488035
TO
11 (name, title, description, is_active, is_default, user_name_label, password_label, signature_label, subject_label, class_name, url_site_default, url_api_default, url_recur_default, url_button_default, url_site_test_default, url_api_test_default, url_recur_test_default, url_button_test_default, billing_mode, is_recur ) VALUES
12 ('Elavon','{ts escape="sql"}Elavon Payment Processor{/ts}','{ts escape="sql"}Elavon / Nova Virtual Merchant{/ts}',1,0,'{ts escape="sql"}SSL Merchant ID {/ts}','{ts escape="sql"}SSL User ID{/ts}','{ts escape="sql"}SSL PIN{/ts}',NULL,'Payment_Elavon','https://www.myvirtualmerchant.com/VirtualMerchant/processxml.do',NULL,NULL,NULL,'https://www.myvirtualmerchant.com/VirtualMerchant/processxml.do',NULL,NULL,NULL,1,0)
13 ON DUPLICATE KEY UPDATE civicrm_payment_processor_type.name='Elavon';
14
15-- CRM-4165
16
17SELECT @og_id_at := max(id) from civicrm_option_group where name = 'activity_type';
18SELECT @max_val := MAX(ROUND(op.value)) FROM civicrm_option_value op WHERE op.option_group_id = @og_id_at;
19SELECT @max_wt := MAX(op.weight) FROM civicrm_option_value op WHERE op.option_group_id = @og_id_at;
20SELECT @mem_comp_id := id from civicrm_component where name = 'CiviMember';
21
22{if $multilingual}
23 INSERT INTO civicrm_option_value
24 (option_group_id, {foreach from=$locales item=locale}label_{$locale}, description_{$locale}, {/foreach} value, name, filter, weight, is_reserved, component_id) VALUES
25 (@og_id_at, {foreach from=$locales item=locale}'Membership Renewal Reminder', 'offline membership renewal reminder.',{/foreach} @max_val + 1, 'Membership Renewal Reminder', 1, @max_wt + 1, 1, @mem_comp_id);
26{else}
27 INSERT INTO civicrm_option_value
28 (option_group_id, label, value, name, filter, weight, description, is_reserved, component_id) VALUES
29 (@og_id_at, 'Membership Renewal Reminder', @max_val + 1, 'Membership Renewal Reminder', 1, @max_wt + 1, 'offline membership renewal reminder.', 1, @mem_comp_id);
30{/if}
31
32-- CRM-3546
33{if $customDataType }
34 {if $multilingual}
10824d34 35 INSERT INTO civicrm_option_group (name, {foreach from=$locales item=locale}description_{$locale},{/foreach} is_reserved, is_active) VALUES
6a488035
TO
36 ('custom_data_type', {foreach from=$locales item=locale}'Custom Data Type',{/foreach} 0, 1 );
37
38 SELECT @option_group_id_cdt := id from civicrm_option_group where name = 'custom_data_type';
39 INSERT INTO civicrm_option_value
40 (option_group_id, {foreach from=$locales item=locale}label_{$locale},{/foreach} value, name, weight) VALUES
41 (@option_group_id_cdt, {foreach from=$locales item=locale}'Participant Role', {/foreach} 1, 'ParticipantRole', 1),
42 (@option_group_id_cdt, {foreach from=$locales item=locale}'Participant Event Name',{/foreach} 2, 'ParticipantEventName', 2);
43 {else}
10824d34 44 INSERT INTO `civicrm_option_group`
45 (`name`, `description`, `is_reserved`, `is_active`) VALUES
6a488035
TO
46 ('custom_data_type' , 'Custom Data Type', 0, 1);
47
48 SELECT @option_group_id_cdt := id from civicrm_option_group where name = 'custom_data_type';
49
10824d34 50 INSERT INTO
51 `civicrm_option_value` (`option_group_id`, `label`, `value`, `name`, `grouping`, `filter`, `is_default`, `weight`, `description`, `is_optgroup`, `is_reserved`, `is_active`, `component_id`, `visibility_id`)
6a488035
TO
52 VALUES
53 (@option_group_id_cdt, 'Participant Role', '1', 'ParticipantRole', NULL, 0, NULL, 1, NULL, 0, 0, 1, NULL, NULL ),
54 (@option_group_id_cdt, 'Participant Event Name', '2', 'ParticipantEventName', NULL, 0, NULL, 2, NULL, 0, 0, 1, NULL, NULL );
55 {/if}
56{/if}