Sha256: e8781152d7a7a6a1d7c15ad1d34a643f8a8df4d55e5650bfbc8c4b9b722e7346

Contents?: true

Size: 344 Bytes

Versions: 58

Compression:

Stored size: 344 Bytes

Contents

# frozen_string_literal: true

class AddCommentableCounterCacheToMeetings < ActiveRecord::Migration[5.2]
  def change
    add_column :decidim_meetings_meetings, :comments_count, :integer, null: false, default: 0
    Decidim::Meetings::Meeting.reset_column_information
    Decidim::Meetings::Meeting.find_each(&:update_comments_count)
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
decidim-meetings-0.25.0.rc4 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.25.0.rc3 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.25.0.rc2 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.25.0.rc1 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.24.3 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.23.6 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.24.2 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.23.5 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.24.1 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.24.0 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.24.0.rc2 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.23.4 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.24.0.rc1 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.23.3 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.23.2 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.23.1 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.23.1.rc1 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb
decidim-meetings-0.23.0 db/migrate/20200827153856_add_commentable_counter_cache_to_meetings.rb