Sha256: 849a37f5e9681b4b5a16bc47c9c6b6fb19dd0253238fd668b0faa40df1c8d65c
Contents?: true
Size: 887 Bytes
Versions: 34
Compression:
Stored size: 887 Bytes
Contents
class UpdateDisconnectedSettings < ActiveRecord::Migration[6.0] class FakeSetting < Katello::Model self.table_name = 'settings' end def up setting_disconnected = FakeSetting.find_by(name: 'content_disconnected') setting = Setting.find_by(name: 'subscription_connection_enabled') setting&.update!( value: !setting_disconnected&.value ) FakeSetting.where(:name => 'content_disconnected').delete_all end def down remove_column :katello_cdn_configurations, :airgapped setting_disconnected = Setting.find_by(name: 'subscription_connection_enabled') FakeSetting.set('content_disconnected', N_("A server operating in disconnected mode does not communicate with the Red Hat CDN."), !setting_disconnected.value, N_('Disconnected mode')) Setting.where(:name => 'subscription_connection_enabled').delete_all end end
Version data entries
34 entries across 34 versions & 1 rubygems