Skip to content

Conversation

@mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jun 19, 2025

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:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@mamhoff mamhoff requested a review from a team as a code owner June 19, 2025 13:56
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Jun 19, 2025
@codecov
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.97%. Comparing base (55a1be5) to head (55dd557).
Report is 2 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@tvdeyen tvdeyen left a 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

@mamhoff mamhoff force-pushed the add-foreign-key-constraint-warnings branch 2 times, most recently from c7481e3 to 7a2794e Compare June 25, 2025 07:21
Copy link
Member

@kennyadsl kennyadsl left a 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]
@mamhoff mamhoff force-pushed the add-foreign-key-constraint-warnings branch from 7a2794e to 55dd557 Compare June 25, 2025 10:29
@tvdeyen tvdeyen merged commit ee815a5 into solidusio:main Jun 25, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_core Changes to the solidus_core gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants