mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-06 02:51:34 +00:00
Merge pull request #3680 from kristinalim/fix/3285-db_migration_bang_shipping_rates
[Spree Upgrade] Bang version of create in DB migration for shipping rates
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
class AddShippingRatesToShipments < ActiveRecord::Migration
|
||||
def up
|
||||
Spree::Shipment.all.each do |shipment|
|
||||
shipment.shipping_rates.create(:shipping_method_id => shipment.shipping_method_id,
|
||||
:cost => shipment.cost,
|
||||
:selected => true)
|
||||
shipment.shipping_rates.create!(:shipping_method_id => shipment.shipping_method_id,
|
||||
:cost => shipment.cost,
|
||||
:selected => true)
|
||||
end
|
||||
|
||||
remove_column :spree_shipments, :shipping_method_id
|
||||
|
||||
Reference in New Issue
Block a user