Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
8018767e
You need to sign in or sign up before continuing.
Commit
8018767e
authored
3 years ago
by
Seamus Lee
Browse files
Options
Downloads
Patches
Plain Diff
#2680
Remove rows in the civicrm_contribution_product table that have...
#2680
Remove rows in the civicrm_contribution_product table that have bad product_ids in them
parent
ee4fe559
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CRM/Upgrade/Incremental/php/FiveForty.php
+2
-0
2 additions, 0 deletions
CRM/Upgrade/Incremental/php/FiveForty.php
with
2 additions
and
0 deletions
CRM/Upgrade/Incremental/php/FiveForty.php
+
2
−
0
View file @
8018767e
...
...
@@ -91,6 +91,8 @@ class CRM_Upgrade_Incremental_php_FiveForty extends CRM_Upgrade_Incremental_Base
*/
public
static
function
addContributionProductFK
(
CRM_Queue_TaskContext
$ctx
):
bool
{
if
(
!
self
::
checkFKExists
(
'civicrm_contribution_product'
,
'FK_civicrm_contribution_product_product_id'
))
{
// dev/core#2680 Clear out any rows with problematic product_ids from the civicrm_contribution_product table.
CRM_Core_DAO
::
executeQuery
(
"DELETE FROM civicrm_contribution_product WHERE product_id NOT IN (SELECT id FROM civicrm_product)"
);
CRM_Core_DAO
::
executeQuery
(
"
ALTER TABLE `civicrm_contribution_product`
ADD CONSTRAINT `FK_civicrm_contribution_product_product_id`
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment