Sha256: 03246cd139a46b9cd38acff356987bbc15093b69bf8d1bd99124784b5f9bd26f
Contents?: true
Size: 526 Bytes
Versions: 8
Compression:
Stored size: 526 Bytes
Contents
# frozen_string_literal: true class AddFollowableCounterCacheToVotings < ActiveRecord::Migration[5.2] class Voting < ApplicationRecord self.table_name = :decidim_votings_votings end def change add_column :decidim_votings_votings, :follows_count, :integer, null: false, default: 0, index: true reversible do |dir| dir.up do Voting.reset_column_information Voting.find_each do |record| record.class.reset_counters(record.id, :follows) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems