Sha256: 02da3ce7f4923177a3cf61994a72c7513e040421dae995130731322236f35ab7

Contents?: true

Size: 381 Bytes

Versions: 12

Compression:

Stored size: 381 Bytes

Contents

# This migration comes from spree (originally 20140804185157)
class AddDefaultToShipmentCost < ActiveRecord::Migration
  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

12 entries across 12 versions & 6 rubygems

Version Path
spree_weight_calculator-0.1.0 test/dummy/db/migrate/20160723192605_add_default_to_shipment_cost.spree.rb
spree_order_reporting-0.0.3 spec/dummy/db/migrate/20160708163202_add_default_to_shipment_cost.spree.rb
spree_order_reporting-0.0.2 spec/dummy/db/migrate/20160707103527_add_default_to_shipment_cost.spree.rb
spree_order_reporting-0.0.1 spec/dummy/db/migrate/20160706112479_add_default_to_shipment_cost.spree.rb
sprangular-0.1.0 spec/dummy/db/migrate/20141203183784_add_default_to_shipment_cost.spree.rb
sprangular-0.0.1 spec/dummy/db/migrate/20141203183784_add_default_to_shipment_cost.spree.rb
spree_mercado_pago-0.2.3 spec/dummy/db/migrate/20141204014770_add_default_to_shipment_cost.spree.rb
spree_mercado_pago-0.2.2 spec/dummy/db/migrate/20141204014770_add_default_to_shipment_cost.spree.rb
spree_mercado_pago-0.2.1 spec/dummy/db/migrate/20141112193553_add_default_to_shipment_cost.spree.rb
spree_mercado_pago-0.2.0 spec/dummy/db/migrate/20141112193553_add_default_to_shipment_cost.spree.rb
spree_mercado_pago_payment_method-0.2.0 spec/dummy/db/migrate/20141112193553_add_default_to_shipment_cost.spree.rb
spree_bitpay-1.0.2 spec/dummy/db/migrate/20141002181338_add_default_to_shipment_cost.spree.rb