Sha256: f4e4f0ef783c3bf295a695185ea0fb5e59a6936ad900b229416ef646b369dfab

Contents?: true

Size: 449 Bytes

Versions: 47

Compression:

Stored size: 449 Bytes

Contents

class UpdateCustomCdn < ActiveRecord::Migration[6.1]
  class FakeCdnConfiguration < Katello::Model
    self.table_name = 'katello_cdn_configurations'
    self.inheritance_column = nil
  end

  def change
    FakeCdnConfiguration.reset_column_information
    FakeCdnConfiguration.where(type: 'redhat_cdn').each do |config|
      config.update!(type: 'custom_cdn') unless Katello::Resources::CDN::CdnResource.redhat_cdn?(config.url)
    end
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
katello-4.11.0 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.11.0.rc2 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.11.0.rc1 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.10.0 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.9.2 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.10.0.rc2 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.10.0.rc1 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.8.4 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.9.1 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.8.3 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.9.0 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.7.6 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.8.2 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.9.0.rc2 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.9.0.rc1 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.8.1 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.7.5 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.8.0 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.8.0.rc2 db/migrate/20220730033504_update_custom_cdn.rb
katello-4.7.4 db/migrate/20220730033504_update_custom_cdn.rb