Skip to content
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 dependent: :destroy to Spree::Order#order_promotions #5411

Merged
merged 2 commits into from
Nov 1, 2023

Commits on Oct 27, 2023

  1. Add dependent: :destroy to Spree::Order#order_promotions

    We found a lot of orphaned records in our database due to this missing
    dependent: :destroy.
    mamhoff committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    d8dcd14 View commit details
    Browse the repository at this point in the history
  2. Add foreign key constraint to Spree::OrderPromotions table

    This adds a foreign key constraint that makes sure at the database level
    that we don't have non-existent order IDs in the spree_orders_promotions
    table.
    mamhoff committed Oct 27, 2023
    Configuration menu
    Copy the full SHA
    9e4a2c9 View commit details
    Browse the repository at this point in the history