mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
GitHub issue #582 We encountered a foreign key violation on adjustment metadata even though rails should handle that. Action: order.adjustments.where(originator_type: 'EnterpriseFee').destroy_all Adjustment: has_one :metadata, class_name: 'AdjustmentMetadata' dependent: :destroy So we update the foreign key to cause a delete in the database.