Sha256: ba0bfdabcb380a8b8577f5277994147c998445f958da581b004cfc6a59a977d7

Contents?: true

Size: 524 Bytes

Versions: 14

Compression:

Stored size: 524 Bytes

Contents

# frozen_string_literal: true

class AddValuationAssignmentsCountToDecidimProposalsProposals < ActiveRecord::Migration[6.1]
  def change
    add_column :decidim_proposals_proposals, :valuation_assignments_count, :integer, default: 0

    reversible do |dir|
      dir.up do
        Decidim::Proposals::Proposal.reset_column_information
        Decidim::Proposals::Proposal.find_each do |record|
          Decidim::Proposals::Proposal.reset_counters(record.id, :valuation_assignments)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
decidim-proposals-0.29.1 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.28.4 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.27.9 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.29.0 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.28.3 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.27.8 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.29.0.rc4 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.29.0.rc3 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.29.0.rc2 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.29.0.rc1 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.28.2 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.27.7 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.28.1 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb
decidim-proposals-0.27.6 db/migrate/20240404202756_add_valuation_assignments_count_to_decidim_proposals_proposals.rb