Sha256: 65d0eb91242f193ae66834c8577c5f0e710c0a2e5660d5d1071ee08a9102a783

Contents?: true

Size: 463 Bytes

Versions: 50

Compression:

Stored size: 463 Bytes

Contents

# frozen_string_literal: true

class AddFollowableCounterCacheToConferences < ActiveRecord::Migration[5.2]
  def change
    add_column :decidim_conferences, :follows_count, :integer, null: false, default: 0, index: true

    reversible do |dir|
      dir.up do
        Decidim::Conference.reset_column_information
        Decidim::Conference.find_each do |record|
          record.class.reset_counters(record.id, :follows)
        end
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
decidim-conferences-0.29.2 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.28.5 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.29.1 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.28.4 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.27.9 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.29.0 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.28.3 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.27.8 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.29.0.rc4 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.29.0.rc3 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.29.0.rc2 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.29.0.rc1 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.28.2 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.27.7 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.28.1 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.27.6 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.26.10 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.26.9 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.28.0 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb
decidim-conferences-0.27.5 db/migrate/20210310134942_add_followable_counter_cache_to_conferences.rb