-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Handle failing foreign key additions #6293
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
Handle failing foreign key additions #6293
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6293 +/- ##
=======================================
Coverage 88.97% 88.97%
=======================================
Files 861 861
Lines 18416 18416
=======================================
Hits 16386 16386
Misses 2030 2030 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tvdeyen
left a comment
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.
Nice! Some wrong comments, though
core/db/migrate/20250605105424_add_shipping_category_foreign_keys.rb
Outdated
Show resolved
Hide resolved
c7481e3 to
7a2794e
Compare
kennyadsl
left a comment
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.
It should be saf to change these migrations, as if people already ran them without issues, they are safe anyway. If they got some issues, they probably already solved them.
We've added some foreign key constraints recently, and have since come up with a nicer way of guiding users towards fixing their data intentionally. This change gives them a nice error message and allows them to change the migration to remove offending records. Co-Authored-By: [email protected]
7a2794e to
55dd557
Compare
Summary
We've added some foreign key constraints recently, and have since come up with a nicer way of guiding users towards fixing their data intentionally.
This change gives them a nice error message and allows them to change the migration to remove offending records.
Co-Authored-By: [email protected]
Checklist
Check out our PR guidelines for more details.
The following are mandatory for all PRs:
The following are not always needed: