Implement `dismissal_reason` field on the Vulnerability::Read model
In order to optimise filtering of vulnerabilities by dismissal_reason, we need to denormalise the dismissal_reason value to the vulnerability_reads table. The first step, naturally, is to add the column to the table.
The field will be a nullable int
which will mount the Vulnerability::Enums.dismissal_reasons
enum.
We will additionally need to update the index_vulnerabilities_common_finder_query_on_default_branch
index to include this new filter value.
Implementation Plan
-
Create a migration to add the :dismissal_reason, :int
column tovulnerability_reads
-
Mount the Vulnerability::Enums.dismissal_reasons
enum toVulnerability:Reads
-
Update index_vulnerabilities_common_finder_query_on_default_branch
to include thedismissal_reason
value