Sha256: 55b8fe4e7930333a43a694f543e4a2674607221848e386fce8fa990fcb564b07
Contents?: true
Size: 423 Bytes
Versions: 6
Compression:
Stored size: 423 Bytes
Contents
class CreateDefaultImpacts < ActiveRecord::Migration IMPACT_DEFAULTS = %w[NONE PARTIAL COMPLETE] def self.up IMPACT_DEFAULTS.each do |name| FIDIUS::CveDb::Impact.find_or_create_by_name(name) end end def self.down IMPACT_DEFAULTS.each do |name| impacts = FIDIUS::CveDb::Impact.where({ :name => name }) impacts.each do |impact| impact.destroy! end end end end
Version data entries
6 entries across 6 versions & 1 rubygems