mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-28 01:53:25 +00:00
Use bang version of create! in DB migration script
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