Sha256: b1bf04b5aa8cdc351dc88b3b9ece0a9c890a9bee2538f38e118cb7b1db359ea5
Contents?: true
Size: 471 Bytes
Versions: 141
Compression:
Stored size: 471 Bytes
Contents
class AddShippingRatesToShipments < ActiveRecord::Migration[4.2] def up Spree::Shipment.find_each do |shipment| shipment.shipping_rates.create(shipping_method_id: shipment.shipping_method_id, cost: shipment.cost, selected: true) end remove_column :spree_shipments, :shipping_method_id end def down add_column :spree_shipments, :shipping_method_id, :integer end end
Version data entries
141 entries across 141 versions & 2 rubygems