Sha256: da3c74e5a3cf8be931dad2e07830352787674d078bbc9390d702cfed7b320eab
Contents?: true
Size: 426 Bytes
Versions: 9
Compression:
Stored size: 426 Bytes
Contents
# This migration comes from spree (originally 20130806145853) class SetDefaultStockLocationOnShipments < ActiveRecord::Migration[4.2] def change if Spree::Shipment.where('stock_location_id IS NULL').count > 0 location = Spree::StockLocation.find_by(name: 'default') || Spree::StockLocation.first Spree::Shipment.where('stock_location_id IS NULL').update_all(stock_location_id: location.id) end end end
Version data entries
9 entries across 9 versions & 2 rubygems