Sha256: 76c766e19449e36771dec0ddf2e571ff603b62ee2268f62c95c4200c702038a4
Contents?: true
Size: 882 Bytes
Versions: 61
Compression:
Stored size: 882 Bytes
Contents
# frozen_string_literal: true class MoveProposalEndorsedEventNotificationsToResourceEndorsedEvent < ActiveRecord::Migration[5.2] def up Decidim::Notification.where(event_name: "decidim.events.proposals.proposal_endorsed", event_class: "Decidim::Proposals::ProposalEndorsedEvent").find_each do |notification| notification.update(event_name: "decidim.events.resource_endorsed", event_class: "Decidim::ResourceEndorsedEvent") end end def down Decidim::Notification.where( event_name: "decidim.events.resource_endorsed", event_class: "Decidim::ResourceEndorsedEvent", decidim_resource_type: "Decidim::Proposals::Proposal" ) .find_each do |notification| notification.update(event_name: "decidim.events.proposals.proposal_endorsed", event_class: "Decidim::Proposals::ProposalEndorsedEvent") end end end
Version data entries
61 entries across 61 versions & 1 rubygems