-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add foreign key constraint between order_promotions
and promotions
#5469
Add foreign key constraint between order_promotions
and promotions
#5469
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't this cause issues with historical orders?
Solidus' promotion system won't recalculate promotion adjustments after orders are completed. So adjustments for historical orders would not change. One would not be able to trace why a certain promotion applied to an order, but once you delete the promotion, chances are you don't really care? Currently the state of deletion in the promotion world is generally weird: PromotionAction records are soft-deleted, but promotions and promotion rules are not. This is just to stop garbage data from being around - because what good is it to know I have an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, that makes sense.
When we delete a promotion, the associated `order_promotions` should also disappear.
37ee2d0
to
f2649f7
Compare
Codecov Report
@@ Coverage Diff @@
## main #5469 +/- ##
=======================================
Coverage 88.93% 88.93%
=======================================
Files 622 622
Lines 14909 14909
=======================================
Hits 13259 13259
Misses 1650 1650
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
order_promotions
and promotions
Summary
When we delete a promotion, the associated
order_promotions
should also disappear.Checklist