Sha256: 4591d76add500fd92bb51aa0bb9b0139fd937afb1b69e1d0a7d4c9c755844a35
Contents?: true
Size: 434 Bytes
Versions: 4
Compression:
Stored size: 434 Bytes
Contents
# This migration comes from spree (originally 20141023005240) class AddCounterCacheFromSpreeVariantsToSpreeStockItems < ActiveRecord::Migration def up add_column :spree_variants, :stock_items_count, :integer, default: 0, null: false Spree::Variant.find_each do |variant| Spree::Variant.reset_counters(variant.id, :stock_items) end end def down remove_column :spree_variants, :stock_items_count end end
Version data entries
4 entries across 4 versions & 3 rubygems