Sha256: a2acbfe11cb12d8750fa9e7b75e46ce6e6cdf4a3991446d42105db70175e0bc4
Contents?: true
Size: 505 Bytes
Versions: 15
Compression:
Stored size: 505 Bytes
Contents
# frozen_string_literal: true class FixUserGroupsIdsInProposalsEndorsements < ActiveRecord::Migration[5.2] # rubocop:disable Rails/SkipsModelValidations def change Decidim::UserGroup.find_each do |group| old_id = group.extended_data["old_user_group_id"] next unless old_id Decidim::Proposals::ProposalEndorsement .where(decidim_user_group_id: old_id) .update_all(decidim_user_group_id: group.id) end end # rubocop:enable Rails/SkipsModelValidations end
Version data entries
15 entries across 15 versions & 1 rubygems