Commit | Line | Data |
---|---|---|
2b0c6f6d C |
1 | {* file to handle db changes in 4.7.23 during upgrade *} |
2 | ||
3 | {include file='../CRM/Upgrade/4.7.23.msg_template/civicrm_msg_template.tpl'} | |
4 | ||
5 | -- CRM-20816: Add CiviCase settings | |
6 | ||
7 | SELECT @civicaseAdminId := id FROM civicrm_navigation WHERE name = 'CiviCase' AND domain_id = {$domainID}; | |
8 | ||
9 | INSERT INTO civicrm_navigation | |
10 | (domain_id, url, label, name, permission, permission_operator, parent_id, is_active, has_separator, weight) | |
11 | VALUES | |
12 | ({$domainID}, 'civicrm/admin/setting/case?reset=1', '{ts escape="sql" skip="true"}CiviCase Settings{/ts}', 'CiviCase Settings', NULL, 'AND', @civicaseAdminId, '1', NULL, 1); | |
13 | ||
14 | -- CRM-20387 | |
15 | UPDATE `civicrm_contribution` SET `invoice_number` = `invoice_id` WHERE `invoice_id` LIKE CONCAT('%', `id`); | |
760ac501 | 16 | |
ce9d78e1 | 17 | -- CRM-20830 |
760ac501 CW |
18 | UPDATE `civicrm_option_value` |
19 | SET filter = 1 | |
20 | WHERE option_group_id = (SELECT id FROM civicrm_option_group WHERE name = 'activity_status') | |
ce9d78e1 CW |
21 | AND name = 'Completed'; |
22 | ||
23 | UPDATE `civicrm_option_value` | |
24 | SET filter = 2 | |
25 | WHERE option_group_id = (SELECT id FROM civicrm_option_group WHERE name = 'activity_status') | |
26 | AND name IN ('Cancelled', 'Unreachable', 'Not Required', 'No-show'); | |
c5eaeb33 | 27 | |
28 | -- CRM-20848 : Set non-quick-config price field and their respective price options to active if it's not | |
29 | UPDATE civicrm_price_field_value cpfv | |
30 | INNER JOIN civicrm_financial_type cft ON cft.id = cpfv.financial_type_id | |
31 | INNER JOIN civicrm_price_field pf ON pf.id = cpfv.price_field_id | |
32 | INNER JOIN civicrm_price_set ps ON ps.id = pf.price_set_id | |
33 | SET cpfv.is_active = 1 | |
34 | WHERE ps.is_quick_config = 1; | |
35 | ||
36 | UPDATE civicrm_price_field cpf | |
37 | LEFT JOIN (SELECT DISTINCT price_field_id AS price_field_id | |
38 | FROM civicrm_price_field_value | |
39 | WHERE is_active = 1) AS price_field | |
40 | ON price_field.price_field_id = cpf.id | |
41 | LEFT JOIN civicrm_price_set ps ON ps.id = cpf.price_set_id | |
42 | SET cpf.is_active = 1 | |
43 | WHERE ps.is_quick_config = 1 AND cpf.is_active = 0; |