Sha256: 57640fc60bc09116eebcc8fc178606ee4b0c2a40090ba30774d99b0ebd0e14e4

Contents?: true

Size: 412 Bytes

Versions: 14

Compression:

Stored size: 412 Bytes

Contents

class FixRedHatRootRepositoryArch < ActiveRecord::Migration[6.0]
  def up
    ::Katello::RootRepository.
      joins("INNER JOIN katello_contents ON katello_contents.cp_content_id = katello_root_repositories.content_id").
      where.not(arch: 'noarch').where.not("katello_contents.content_url ILIKE '%$basearch%'").update(arch: 'noarch')
  end

  def down
    fail ActiveRecord::IrreversibleMigration
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
katello-4.2.0.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.1.4 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.0.3 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.2.0.1.rc3 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.2.0.1.rc2 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.2.0.rc2 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.1.3 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.2.0.rc1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.0.2.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.1.2.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.0.2 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.1.2 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.1.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.1.0 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb