Sha256: 9d744630b1461978d378130cf0c35ceddf91551eee054daf9f6541273886baed
Contents?: true
Size: 483 Bytes
Versions: 13
Compression:
Stored size: 483 Bytes
Contents
# frozen_string_literal: true # 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
13 entries across 13 versions & 1 rubygems