public function upgrade_4_7_beta6($rev) {
$this->addTask(ts('Upgrade DB to %1: SQL', array(1 => $rev)), 'runSql', $rev);
$this->addTask('Disable flexible jobs extension', 'disableFlexibleJobsExtension');
+ $this->addTask('Add Index to financial_trxn trxn_id field', 'addIndexFinancialTrxnTrxnID');
}
/**
return TRUE;
}
+ /**
+ * CRM-17752 add index to civicrm_financial_trxn.trxn_id (deliberately non-unique).
+ *
+ * @param \CRM_Queue_TaskContext $ctx
+ *
+ * @return bool
+ */
+ public function addIndexFinancialTrxnTrxnID(CRM_Queue_TaskContext $ctx) {
+ $tables = array('civicrm_financial_trxn' => array('trxn_id'));
+ CRM_Core_BAO_SchemaHandler::createIndexes($tables);
+ return TRUE;
+ }
+
}
SET max_additional_participants = 9
WHERE is_multiple_registrations = 1;
--- CRM-17752
-ALTER TABLE `civicrm_financial_trxn`
-ADD INDEX `UI_ftrxn_trxn_id` (`trxn_id`);
-
SELECT @domainID := min(id) FROM civicrm_domain;
-INSERT INTO civicrm_setting(name, value, domain_id, is_domain) values ('installed', 'i:1;', @domainID, 1);
\ No newline at end of file
+INSERT INTO civicrm_setting(name, value, domain_id, is_domain) values ('installed', 'i:1;', @domainID, 1);