Sha256: 684823ab2db5b0fad21b9b812378a923296b473482eacc1e221a895670745cfc
Contents?: true
Size: 479 Bytes
Versions: 10
Compression:
Stored size: 479 Bytes
Contents
# frozen_string_literal: true class AddAnswerOptionsCounterCacheToQuestions < ActiveRecord::Migration[6.1] def change add_column :decidim_forms_questions, :answer_options_count, :integer, null: false, default: 0 reversible do |dir| dir.up do Decidim::Forms::Question.reset_column_information Decidim::Forms::Question.find_each do |record| record.class.reset_counters(record.id, :answer_options) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems