Sha256: d309a314e97fde70591bffb85616aca031a5372f16790fbab4501745f6caa80f
Contents?: true
Size: 372 Bytes
Versions: 46
Compression:
Stored size: 372 Bytes
Contents
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
46 entries across 46 versions & 1 rubygems