Sha256: d8c5bc539e22562240fc2dc54f1e3908318b791f83f79cdcfe557c52e79fa0ad
Contents?: true
Size: 925 Bytes
Versions: 6
Compression:
Stored size: 925 Bytes
Contents
# frozen_string_literal: true class MoveParagraphEndorsedEventNotificationsToResourceEndorsedEvent < ActiveRecord::Migration[5.2] def up Decidim::Notification.where(event_name: "decidim.events.enhanced_textwork.paragraph_endorsed", event_class: "Decidim::EnhancedTextwork::ParagraphEndorsedEvent").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::EnhancedTextwork::Paragraph" ) .find_each do |notification| notification.update(event_name: "decidim.events.enhanced_textwork.paragraph_endorsed", event_class: "Decidim::EnhancedTextwork::ParagraphEndorsedEvent") end end end
Version data entries
6 entries across 6 versions & 1 rubygems