Commit 888bfec3 authored by Jonathan Schafer's avatar Jonathan Schafer

Ignnore Finding Evidence summary column

Changelog: changed
EE: true
parent da120cce
......@@ -3,15 +3,17 @@
module Vulnerabilities
class Finding
class Evidence < ApplicationRecord
include IgnorableColumns
self.table_name = 'vulnerability_finding_evidences'
ignore_column :summary, remove_with: '14.9', remove_after: '2022-03-17'
belongs_to :finding,
class_name: 'Vulnerabilities::Finding',
inverse_of: :finding_evidence,
foreign_key: 'vulnerability_occurrence_id',
optional: false
validates :summary, length: { maximum: 8_000_000 }
validates :data, length: { maximum: 16_000_000 }, presence: true
end
end
......
......@@ -3,7 +3,6 @@
require 'spec_helper'
RSpec.describe Vulnerabilities::Finding::Evidence do
it { is_expected.to validate_length_of(:summary).is_at_most(8_000_000) }
it { is_expected.to validate_presence_of(:data) }
it { is_expected.to validate_length_of(:data).is_at_most(16_000_000) }
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment