Skip to content

Commit

Permalink
Merge pull request #22301 from eileenmcnaughton/recur_data
Browse files Browse the repository at this point in the history
Follow up fix on recur data
  • Loading branch information
seamuslee001 authored Dec 22, 2021
2 parents 16282d8 + 64cc9df commit c202451
Show file tree
Hide file tree
Showing 2 changed files with 3,920 additions and 2,827 deletions.
4 changes: 4 additions & 0 deletions CRM/Core/CodeGen/GenerateData.php
Original file line number Diff line number Diff line change
Expand Up @@ -1727,6 +1727,9 @@ private function addPCP() {
}

private function addContribution() {
// The process is a bit weird & the payment processor gets added later...
// so we need to disable foreign key checks here.
$this->_query('SET foreign_key_checks = 0');
$query = "
INSERT INTO civicrm_contribution_recur
(contact_id, amount, currency, frequency_unit, frequency_interval, installments, start_date, cancel_date, cancel_reason, processor_id, trxn_id, contribution_status_id, next_sched_contribution_date, payment_processor_id)
Expand All @@ -1735,6 +1738,7 @@ private function addContribution() {
(99, 10.00, 'USD', 'month', 1, 6, '2010-03-08 00:00:00', '2010-04-08 10:00:00', 'no longer interested', 6789, 9988, 3, NULL, 1)
";
$this->_query($query);
$this->_query('SET foreign_key_checks = 1');

$query = "
INSERT INTO civicrm_contribution
Expand Down
Loading

0 comments on commit c202451

Please sign in to comment.