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.7.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.6.2.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.6.2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.7.0 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.6.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.7.0.rc2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.7.0.rc1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.4.2.2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.4.2.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.4.2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.5.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.6.0 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.6.0.rc2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.6.0.rc1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.5.0 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.5.0.rc2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.4.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.5.0.rc1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.4.0.2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.4.0.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb