$this->addTask('Add Index to financial_trxn trxn_id field', 'addIndexFinancialTrxnTrxnID');
}
+ /**
+ * Upgrade function.
+ *
+ * @param string $rev
+ */
+ public function upgrade_4_7_1($rev) {
+ $this->addTask('Add Index to civicrm_contribution creditnote_id field', 'addIndexContributionCreditNoteID');
+ }
+
/**
* CRM-16354
*
return TRUE;
}
+ /**
+ * CRM-17882 Add index to civicrm_contribution.credit_note_id.
+ *
+ * @param \CRM_Queue_TaskContext $ctx
+ *
+ * @return bool
+ */
+ public function addIndexContributionCreditNoteID(CRM_Queue_TaskContext $ctx) {
+ $tables = array('civicrm_contribution' => array('creditnote_id'));
+ CRM_Core_BAO_SchemaHandler::createIndexes($tables);
+ return TRUE;
+ }
+
}