Sha256: 86a88396564c987a17bd23cbfc3c75236a05db024db3ff468c36b47db5d17fe9
Contents?: true
Size: 733 Bytes
Versions: 36
Compression:
Stored size: 733 Bytes
Contents
class RemoveKatelloFromNotificationName < ActiveRecord::Migration class FakeMailNotification < ActiveRecord::Base 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
36 entries across 36 versions & 1 rubygems