Sha256: fb5ec6b452d104896bf1dc47d6680de8ba55845264c7dc2e85da4bfdfce7a1b0

Contents?: true

Size: 380 Bytes

Versions: 45

Compression:

Stored size: 380 Bytes

Contents

# frozen_string_literal: true

class AddCommentableCounterCacheToConsultations < ActiveRecord::Migration[5.2]
  def change
    add_column :decidim_consultations_questions, :comments_count, :integer, null: false, default: 0, index: true
    Decidim::Consultations::Question.reset_column_information
    Decidim::Consultations::Question.find_each(&:update_comments_count)
  end
end

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
decidim-consultations-0.27.9 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.8 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.7 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.6 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.26.10 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.26.9 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.5 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.26.8 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.4 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.3 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.26.7 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.26.5 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.2 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.1 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.26.4 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.0 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.26.3 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.0.rc2 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.27.0.rc1 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb
decidim-consultations-0.26.2 db/migrate/20200827154143_add_commentable_counter_cache_to_consultations.rb