Sha256: 2a664cd2b04c5950c6941f2678c5517c2dbaad74f92b5f41bdaddc3a11325512

Contents?: true

Size: 416 Bytes

Versions: 75

Compression:

Stored size: 416 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_all(arch: 'noarch')
  end

  def down
    fail ActiveRecord::IrreversibleMigration
  end
end

Version data entries

75 entries across 75 versions & 1 rubygems

Version Path
katello-4.14.3 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.14.2 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.15.0 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.15.0.rc2 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.15.0.rc1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.14.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.14.0 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.14.0.rc3 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.14.0.rc2 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.14.0.rc1.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.14.0.rc1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.13.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.13.0 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.12.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.13.0.rc1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.12.0 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.12.0.rc3 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.12.0.rc2 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.12.0.rc1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb
katello-4.11.1 db/migrate/20210512192745_fix_red_hat_root_repository_arch.rb