Sha256: 68e7d36e1956fa102c174fd073a6748a73d24d72ef262d045250b86322bd04f0

Contents?: true

Size: 330 Bytes

Versions: 119

Compression:

Stored size: 330 Bytes

Contents

class RemoveAuditsOfRootRepoWithContentId < ActiveRecord::Migration[6.0]
  def change
    audit_records = Audit.where(
      :auditable_type => 'Katello::RootRepository',
      :action => 'update')
    audit_records = audit_records.reject { |ar| ar.audited_changes['content_id'].nil? }
    audit_records.map(&:destroy!)
  end
end

Version data entries

119 entries across 119 versions & 1 rubygems

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