Sha256: 80461cd2cece3fa57549c4fb1dc2e2247966dc2d54c1165db8e7934e96bfdefd

Contents?: true

Size: 324 Bytes

Versions: 9

Compression:

Stored size: 324 Bytes

Contents

# This migration comes from spree (originally 20141009204607)
class AddStoreIdToOrders < ActiveRecord::Migration[4.2]
  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

9 entries across 9 versions & 2 rubygems

Version Path
spree_purchase_order-3.7.0 spec/dummy/db/migrate/20191113195894_add_store_id_to_orders.spree.rb
spree_billing_sisow-0.9.2 spec/dummy/db/migrate/20190729091835_add_store_id_to_orders.spree.rb
spree_billing_sisow-0.9.1 spec/dummy/db/migrate/20190729091835_add_store_id_to_orders.spree.rb
spree_purchase_order-3.6.0 spec/dummy/db/migrate/20180516182023_add_store_id_to_orders.spree.rb
spree_purchase_order-3.5.0 spec/dummy/db/migrate/20180516182023_add_store_id_to_orders.spree.rb
spree_purchase_order-3.5.0.rc1 spec/dummy/db/migrate/20180516182023_add_store_id_to_orders.spree.rb
spree_purchase_order-3.4.0 spec/dummy/db/migrate/20180516182023_add_store_id_to_orders.spree.rb
spree_purchase_order-3.3.0 spec/dummy/db/migrate/20180516182023_add_store_id_to_orders.spree.rb
spree_purchase_order-3.2.0 spec/dummy/db/migrate/20180516182023_add_store_id_to_orders.spree.rb