Sha256: d36592ba99b64b0569fd80c825d3696fd95fed01ee0fc1724c4b56823b648486
Contents?: true
Size: 329 Bytes
Versions: 10
Compression:
Stored size: 329 Bytes
Contents
class RemoveDeletedPolicy < ActiveRecord::Migration def up ForemanOpenscap::AssetPolicy.all.collect(&:policy_id).uniq.each do |policy_id| execute("DELETE FROM foreman_openscap_asset_policies WHERE policy_id = '#{policy_id}';") if ForemanOpenscap::Policy.find_by_id(policy_id).nil? end end def down end end
Version data entries
10 entries across 10 versions & 1 rubygems