Sha256: 6418405685f99acd672772307a72260995ee0e58cdd93f3dd33ea8f7fcd8ab3c

Contents?: true

Size: 319 Bytes

Versions: 4

Compression:

Stored size: 319 Bytes

Contents

# This migration comes from spree (originally 20141009204607)
class AddStoreIdToOrders < ActiveRecord::Migration
  def change
    add_column :spree_orders, :store_id, :integer
    if Spree::Store.default.persisted?
      Spree::Order.where(store_id: nil).update_all(store_id: Spree::Store.default.id)
    end
  end
end

Version data entries

4 entries across 4 versions & 3 rubygems

Version Path
spree_weight_calculator-0.1.0 test/dummy/db/migrate/20160723192616_add_store_id_to_orders.spree.rb
spree_order_reporting-0.0.3 spec/dummy/db/migrate/20160708163212_add_store_id_to_orders.spree.rb
sprangular-0.1.0 spec/dummy/db/migrate/20141203183794_add_store_id_to_orders.spree.rb
sprangular-0.0.1 spec/dummy/db/migrate/20141203183794_add_store_id_to_orders.spree.rb