Skip to content

Conversation

mamhoff
Copy link
Contributor

@mamhoff mamhoff commented Jun 5, 2025

Summary

Adds foreign key constraints and validations to tables related to shipping categories, specifically spree_products and spree_shipping_method_categories.

Extracted from #6240

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 5, 2025 11:03
@github-actions github-actions bot added the changelog:solidus_core Changes to the solidus_core gem label Jun 5, 2025
@mamhoff mamhoff force-pushed the shipping-category-foreign-keys branch from 4d5f91a to 8ba4a68 Compare June 5, 2025 12:10
@github-actions github-actions bot added the changelog:solidus_backend Changes to the solidus_backend gem label Jun 5, 2025
@mamhoff mamhoff force-pushed the shipping-category-foreign-keys branch from 8ba4a68 to 45f05d3 Compare June 5, 2025 12:39
@github-actions github-actions bot added the changelog:solidus_api Changes to the solidus_api gem label Jun 5, 2025
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.95%. Comparing base (1061e56) to head (4b87bdd).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6278      +/-   ##
==========================================
- Coverage   88.95%   88.95%   -0.01%     
==========================================
  Files         860      860              
  Lines       18423    18422       -1     
==========================================
- Hits        16388    16387       -1     
  Misses       2035     2035              

☔ 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.

@mamhoff mamhoff force-pushed the shipping-category-foreign-keys branch from 45f05d3 to fe085ed Compare June 6, 2025 10:33
mamhoff added 2 commits June 18, 2025 15:17
The `Spree::ShippingMethodCategory` is a join model and needs foreign
keys on both ends. The shipping method id on products was mandatory
before, so it's safe to remove the `optional: true` on the `belongs_to`
declaration and add a foreign key constraint here as well.
@mamhoff mamhoff force-pushed the shipping-category-foreign-keys branch from fe085ed to 4b87bdd Compare June 18, 2025 13:18
@tvdeyen tvdeyen added this to the 4.6 milestone Jun 18, 2025
@tvdeyen tvdeyen moved this to In Progress in Solidus Public Roadmap Jun 18, 2025
@tvdeyen tvdeyen enabled auto-merge June 18, 2025 13:28
@tvdeyen tvdeyen merged commit db99cba into solidusio:main Jun 18, 2025
22 of 23 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in Solidus Public Roadmap Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_api Changes to the solidus_api gem changelog:solidus_backend Changes to the solidus_backend gem changelog:solidus_core Changes to the solidus_core gem

Projects

Development

Successfully merging this pull request may close these issues.

3 participants