Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Follow up fix on recur data #22301

Merged
merged 1 commit into from
Dec 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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