Merge pull request #6465 from colemanw/CRM-16689
[civicrm-core.git] / CRM / Upgrade / Incremental / sql / 4.7.alpha1.mysql.tpl
1 {* file to handle db changes in 4.7.alpha1 during upgrade *}
2
3 -- CRM-16354
4 SELECT @option_group_id_wysiwyg := max(id) from civicrm_option_group where name = 'wysiwyg_editor';
5
6 UPDATE civicrm_option_value SET name = 'Textarea', {localize field='label'}label = 'Textarea'{/localize}
7 WHERE value = 1 AND option_group_id = @option_group_id_wysiwyg;
8
9 DELETE FROM civicrm_option_value WHERE name IN ('Joomla Default Editor', 'Drupal Default Editor')
10 AND option_group_id = @option_group_id_wysiwyg;
11
12 UPDATE civicrm_option_value SET is_active = 1, is_reserved = 1 WHERE option_group_id = @option_group_id_wysiwyg;
13
14 --CRM-16719
15 SELECT @option_group_id_report := max(id) from civicrm_option_group where name = 'report_template';
16
17 UPDATE civicrm_option_value SET {localize field="label"}label = 'Activity Details Report'{/localize}
18 WHERE value = 'activity' AND option_group_id = @option_group_id_report;
19
20 UPDATE civicrm_option_value SET {localize field="label"}label = 'Activity Summary Report'{/localize}
21 WHERE value = 'activitySummary' AND option_group_id = @option_group_id_report;
22
23 --CRM-16853 PCP Owner Notification
24
25 {include file='../CRM/Upgrade/4.7.alpha1.msg_template/civicrm_msg_template.tpl'}
26
27 -- CRM-16478 Remove custom fatal error template path
28 DELETE FROM civicrm_setting WHERE name = 'fatalErrorTemplate';
29
30 UPDATE civicrm_state_province SET name = 'Bataan' WHERE name = 'Batasn';
31
32 --CRM-16914
33 ALTER TABLE civicrm_payment_processor
34 ADD COLUMN
35 `payment_instrument_id` int unsigned DEFAULT 1 COMMENT 'Payment Instrument ID';
36
37 ALTER TABLE civicrm_payment_processor_type
38 ADD COLUMN
39 `payment_instrument_id` int unsigned DEFAULT 1 COMMENT 'Payment Instrument ID';
40
41 -- CRM-16876 Set country names to UPPERCASE
42 UPDATE civicrm_country SET `name` = UPPER( `name` );
43
44 -- CRM-16447
45 UPDATE civicrm_state_province SET name = 'Northern Ostrobothnia' WHERE name = 'Nothern Ostrobothnia';
46
47 -- CRM-14078
48 UPDATE civicrm_option_group SET {localize field="title"}title = '{ts escape="sql"}Payment Methods{/ts}'{/localize} WHERE name = 'payment_instrument';
49 UPDATE civicrm_navigation SET label = '{ts escape="sql"}Payment Methods{/ts}' WHERE name = 'Payment Instruments';
50
51 -- CRM-16176
52 {if $multilingual}
53 {foreach from=$locales item=locale}
54 ALTER TABLE civicrm_relationship_type ADD label_a_b_{$locale} varchar(64);
55 ALTER TABLE civicrm_relationship_type ADD label_b_a_{$locale} varchar(64);
56 ALTER TABLE civicrm_relationship_type ADD description_{$locale} varchar(255);
57
58 UPDATE civicrm_relationship_type SET label_a_b_{$locale} = label_a_b;
59 UPDATE civicrm_relationship_type SET label_b_a_{$locale} = label_b_a;
60 UPDATE civicrm_relationship_type SET description_{$locale} = description;
61 {/foreach}
62
63 ALTER TABLE civicrm_relationship_type DROP label_a_b;
64 ALTER TABLE civicrm_relationship_type DROP label_b_a;
65 ALTER TABLE civicrm_relationship_type DROP description;
66 {/if}