Sha256: 6faeda15ac5cc96844986bacb7e4850ba8e7a3623225004ea80221a5692e3f69

Contents?: true

Size: 460 Bytes

Versions: 5

Compression:

Stored size: 460 Bytes

Contents

# This migration comes from acts_as_taggable_on_engine (originally 3)
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2]
  def self.up
    add_column :tags, :taggings_count, :integer, default: 0

    # ActsAsTaggableOn::Tag.reset_column_information
    # ActsAsTaggableOn::Tag.find_each do |tag|
    #   ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings)
    # end
  end

  def self.down
    remove_column :tags, :taggings_count
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
jeygeethanmedia-inkpen-1.2.6.2 db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
jeygeethanmedia-inkpen-1.2.6.1 db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
lines-engine-1.2.6.1 db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
lines-engine-1.2.6 db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb
lines-engine-1.2.5 db/migrate/20140702160604_add_taggings_counter_cache_to_tags.acts_as_taggable_on_engine.rb