Sha256: 4733557505add34e2070881a1c9c7de64f3859384f956a8f1b921c9b01ac8d37

Contents?: true

Size: 386 Bytes

Versions: 9

Compression:

Stored size: 386 Bytes

Contents

# This migration comes from spree (originally 20140804185157)
class AddDefaultToShipmentCost < ActiveRecord::Migration[4.2]
  def up
    change_column :spree_shipments, :cost, :decimal, precision: 10, scale: 2, default: 0.0
    Spree::Shipment.where(cost: nil).update_all(cost: 0)
  end

  def down
    change_column :spree_shipments, :cost, :decimal, precision: 10, scale: 2
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195883_add_default_to_shipment_cost.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091824_add_default_to_shipment_cost.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091824_add_default_to_shipment_cost.spree.rb
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516182012_add_default_to_shipment_cost.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516182012_add_default_to_shipment_cost.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516182012_add_default_to_shipment_cost.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516182012_add_default_to_shipment_cost.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516182012_add_default_to_shipment_cost.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516182012_add_default_to_shipment_cost.spree.rb