Skip to content

Add present_on_default_branch:boolean to Vulnerabilities

What does this MR do?

This MR adds present_on_default_branch:boolean to vulnerabilites table so we can filter out Vulnerabilites that should not be shown in the Vulnerability Report section.

For now, all newly created Vulnerabilities will be marked as present so that we don't break the current behavior. This is the first step to deprecate Vulnerabilites::Feedback model (&5629 (closed))

Related to #324857 (closed)

Database review

bundle exec rails db:migrate STEP=1
== 20210623123722 AddPresentOnDefaultBranchToVulnerabilities: migrating =======
-- add_column(:vulnerabilities, :present_on_default_branch, :boolean, {:default=>true, :null=>false})
   -> 0.0026s
== 20210623123722 AddPresentOnDefaultBranchToVulnerabilities: migrated (0.0026s)
bundle exec rails db:rollback STEP=1
== 20210623123722 AddPresentOnDefaultBranchToVulnerabilities: reverting =======
-- remove_column(:vulnerabilities, :present_on_default_branch, :boolean, {:default=>true, :null=>false})
   -> 0.0018s
== 20210623123722 AddPresentOnDefaultBranchToVulnerabilities: reverted (0.0028s)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Edited by Michał Zając

Merge request reports

Loading