Sha256: 68e7d36e1956fa102c174fd073a6748a73d24d72ef262d045250b86322bd04f0

Contents?: true

Size: 330 Bytes

Versions: 122

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

122 entries across 122 versions & 1 rubygems

Version Path
katello-4.2.0.1.rc2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.2.0.rc2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.3 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.2.0.rc1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.0.2.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.2.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.0.2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-3.18.4 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.0 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.0.1.2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-3.18.3.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.0.rc2.2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.0.rc2.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.0.1.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-3.18.3 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.0.rc2 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.0.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb
katello-4.1.0.rc1.1 db/migrate/20200610112009_remove_audits_of_root_repo_with_content_id.rb