Skip to content

Remove summary from Finding Evidence

Jonathan Schafer requested to merge 343279-remove-evidence-summary into master

What does this MR do and why?

This MR removes the summary field from Vulnerability Finding Evidence. This field was never used, and the table should be empty. This field will be part of the data jsonb field.

Screenshots or screen recordings

Migration:

== 20220106185033 RemoveFindingEvidenceSummary: migrating =====================
-- remove_column(:vulnerability_finding_evidences, :summary, :text)
   -> 0.0047s
== 20220106185033 RemoveFindingEvidenceSummary: migrated (0.0048s) ============

Rollback:

== 20220106185033 RemoveFindingEvidenceSummary: reverting =====================
-- add_column(:vulnerability_finding_evidences, :summary, :text)
   -> 0.0032s
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0003s
-- transaction_open?()
   -> 0.0000s
-- execute("ALTER TABLE vulnerability_finding_evidences\nADD CONSTRAINT check_5773b236fb\nCHECK ( char_length(summary) <= 8000000 )\nNOT VALID;\n")
   -> 0.0053s
-- current_schema()
   -> 0.0002s
-- execute("SET statement_timeout TO 0")
   -> 0.0007s
-- execute("ALTER TABLE vulnerability_finding_evidences VALIDATE CONSTRAINT check_5773b236fb;")
   -> 0.0028s
-- execute("RESET statement_timeout")
   -> 0.0008s
== 20220106185033 RemoveFindingEvidenceSummary: reverted (0.0395s) ============

How to set up and validate locally

  1. Look at the model
    Vulnerabilities::Finding::Evidence
  2. It should not show the summary field

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #343279

Edited by Jonathan Schafer

Merge request reports