Sha256: b0d8d7c3ca95c7fdfe19759ce602ef690b2ec27590e0263978a84b56ad88e63d
Contents?: true
Size: 737 Bytes
Versions: 177
Compression:
Stored size: 737 Bytes
Contents
class RemoveKatelloFromNotificationName < ActiveRecord::Migration[4.2] class FakeMailNotification < ApplicationRecord self.table_name = 'mail_notifications' end def up FakeMailNotification.all.each do |notification| if notification_names.keys.include?(notification.name) new_name = notification_names[notification.name] FakeMailNotification.where(:name => new_name).destroy_all notification.name = new_name notification.save! end end end private def notification_names { :katello_promote_errata => 'promote_errata', :katello_sync_errata => 'sync_errata', :katello_host_advisory => 'host_errata_advisory' }.with_indifferent_access end end
Version data entries
177 entries across 177 versions & 1 rubygems