Sha256: 915a33b96bbc2129098610f35d6d13573b7904986c36479ac14b2ad2d40c3a63

Contents?: true

Size: 727 Bytes

Versions: 56

Compression:

Stored size: 727 Bytes

Contents

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

  def change
    add_index :katello_cdn_configurations, :organization_id, unique: true
    add_column :katello_cdn_configurations, :type, :string, default: 'redhat_cdn'

    FakeCdnConfiguration.reset_column_information
    FakeCdnConfiguration.all.each do |config|
      unless config.username.blank? ||
             config.password.blank? ||
             config.upstream_organization_label.blank? ||
             config.ssl_ca_credential_id.blank?
        config.update!(type: 'upstream_server')
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 1 rubygems

Version Path
katello-4.14.2 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.15.0 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.15.0.rc2 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.15.0.rc1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.14.1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.14.0 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.14.0.rc3 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.14.0.rc2 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.14.0.rc1.1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.14.0.rc1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.13.1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.13.0 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.12.1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.13.0.rc1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.12.0 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.12.0.rc3 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.12.0.rc2 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.12.0.rc1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.11.1 db/migrate/20220124191056_add_type_to_cdn_configuration.rb
katello-4.11.0 db/migrate/20220124191056_add_type_to_cdn_configuration.rb