Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.5
-
Fix Version/s: 4.3.6
-
Component/s: CiviContribute
-
Labels:None
Description
This probably affects other 4.3.x releases; I didn't really dig.
A fresh install reads in civicrm.mysql, which does:
CREATE TABLE `civicrm_contribution_product` (
– some stuff
CONSTRAINT `FK_civicrm_contribution_product_financial_type_id` FOREIGN KEY (`financial_type_id`) REFERENCES `civicrm_financial_type` (`id`) ON DELETE SET NULL
)
An upgrade uses CRM/Upgrade/Incremental/sql/4.3.alpha1.mysql.tpl, which does:
ALTER TABLE `civicrm_contribution_product`
– some stuff
ADD CONSTRAINT `FK_civicrm_contribution_product_financial_type_id` FOREIGN KEY (`financial_type_id`) REFERENCES `civicrm_financial_type` (`id`);
In other words, upgrades are missing the ON DELETE clause.
I'd be happy to patch this with a little guidance. Is the proper approach to drop and correctly add the constraint in 4.3.6.mysql.tpl?