Sha256: 1fdc40db314c8ebc9fc5c809dbaae3b8af4bea8948d964c78b883ce04fac71e8
Contents?: true
Size: 473 Bytes
Versions: 50
Compression:
Stored size: 473 Bytes
Contents
# frozen_string_literal: true class AddFollowableCounterCacheToDebates < ActiveRecord::Migration[5.2] def change add_column :decidim_debates_debates, :follows_count, :integer, null: false, default: 0, index: true reversible do |dir| dir.up do Decidim::Debates::Debate.reset_column_information Decidim::Debates::Debate.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