| 1 | {* file to handle db changes in 4.4.4 during upgrade *} |
| 2 | |
| 3 | {* update comment for civicrm_report_instance.grouprole *} |
| 4 | ALTER TABLE civicrm_report_instance MODIFY grouprole varchar(1024) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'role required to be able to run this instance'; |
| 5 | |
| 6 | {* CRM-14117 *} |
| 7 | UPDATE civicrm_navigation SET url = 'http://civicrm.org/what/whatiscivicrm' WHERE name = 'About'; |
| 8 | |
| 9 | -- CRM-13968 |
| 10 | SELECT @inprogressstatus := value FROM civicrm_option_value cov |
| 11 | LEFT JOIN civicrm_option_group cg ON cov.option_group_id = cg.id |
| 12 | WHERE cg.name = 'contribution_status' AND cov.name = 'In Progress'; |
| 13 | |
| 14 | SELECT @financialstatus := value FROM civicrm_option_value cov |
| 15 | LEFT JOIN civicrm_option_group cg ON cov.option_group_id = cg.id |
| 16 | WHERE cg.name = 'financial_item_status' AND cov.name = 'Unpaid'; |
| 17 | |
| 18 | SELECT @accountrecievable := id FROM `civicrm_financial_account` WHERE `name` LIKE 'Accounts Receivable'; |
| 19 | |
| 20 | UPDATE civicrm_financial_trxn cft |
| 21 | LEFT JOIN civicrm_entity_financial_trxn ceft ON ceft.financial_trxn_id = cft.id |
| 22 | LEFT JOIN civicrm_entity_financial_trxn ceft_financial_item ON ceft_financial_item.financial_trxn_id = cft.id |
| 23 | LEFT JOIN civicrm_financial_item cfi ON cfi.id = ceft_financial_item.entity_id |
| 24 | SET to_financial_account_id = @accountrecievable, cfi.status_id = @financialstatus |
| 25 | WHERE ceft.entity_table = 'civicrm_contribution' AND ceft_financial_item.entity_table = 'civicrm_financial_item' AND cft.status_id = @inprogressstatus AND cfi.status_id IS NULL; |
| 26 | |
| 27 | {* CRM-14167 *} |
| 28 | ALTER TABLE civicrm_activity_contact ADD INDEX index_record_type ( activity_id, record_type_id ); |