Sha256: 2544d98c65614aaae737933bba2427214b7d0999d3f6f0a2d3ab54761e1269a8
Contents?: true
Size: 513 Bytes
Versions: 6
Compression:
Stored size: 513 Bytes
Contents
# frozen_string_literal: true class AddFollowableCounterCacheToParagraphs < ActiveRecord::Migration[5.2] def change add_column :decidim_enhanced_textwork_paragraphs, :follows_count, :integer, null: false, default: 0, index: true reversible do |dir| dir.up do Decidim::EnhancedTextwork::Paragraph.reset_column_information Decidim::EnhancedTextwork::Paragraph.find_each do |record| record.class.reset_counters(record.id, :follows) end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems