From 454c14f4bc7f86d724a489f803630035c8e82dbd Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Tue, 2 Jan 2024 12:08:10 +0100 Subject: [PATCH] make RemoveKatelloFromNotificationName a noop --- ...0_remove_katello_from_notification_name.rb | 26 +++---------------- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/db/migrate/20160404132250_remove_katello_from_notification_name.rb b/db/migrate/20160404132250_remove_katello_from_notification_name.rb index 37987f0e294..375ddf7dce5 100644 --- a/db/migrate/20160404132250_remove_katello_from_notification_name.rb +++ b/db/migrate/20160404132250_remove_katello_from_notification_name.rb @@ -1,26 +1,8 @@ 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 + # historical placeholder + # only required on setups before https://projects.theforeman.org/issues/14459 + # we can safely assume that fresh installs have the above change already + # and existing install had this migration applied back in 2016 end end