Sha256: 1c6c8cc2cd411accc5b7c0d6ebe5ef8ff037370880f9822f33b69725cce4806f
Contents?: true
Size: 469 Bytes
Versions: 7
Compression:
Stored size: 469 Bytes
Contents
# This migration comes from spree (originally 20120712172620) class AddCounterCacheToZoneMembers < ActiveRecord::Migration def up add_column :spree_zones, :zone_members_count, :integer, :default => 0 Spree::Zone.reset_column_information Spree::Zone.find(:all).each do |zone| Spree::Zone.update_counters zone.id, :zone_members_count => zone.zone_members.length end end def down remove_column :spree_zones, :zone_members_count end end
Version data entries
7 entries across 7 versions & 2 rubygems