Sha256: b300e2b0f5441a2fbcd35900593b13762585706aadd5b52c31e9991e302090ae
Contents?: true
Size: 483 Bytes
Versions: 195
Compression:
Stored size: 483 Bytes
Contents
class AssignContentHostToSmartProxies < ActiveRecord::Migration[4.2] def up SmartProxy.reset_column_information SmartProxy.all.each do |proxy| content_host = ::Katello::System.where(:name => proxy.name).order("created_at DESC").first if content_host proxy.content_host_id = content_host.id proxy.save! end end end def down SmartProxy.all.each do |proxy| proxy.content_host_id = nil proxy.save! end end end
Version data entries
195 entries across 195 versions & 1 rubygems