Skip to content

Add columns `first_pipeline_id` and `latest_pipeline_id` to `vulnerability_occurrences`

In order to drop the vulnerability_occurrence_pipelines table, we need to preserve the first and latest pipelines in which a vulnerability has occurred in order to maintain the current functionality within GitLab.

The most logical place to place this currently is the vulnerability_occurences table as the logic that depends on this information is most commonly used in association with the finding.

These columns should both be nullable, as continuous scanning or alternative scan sources will not have a pipeline_id to associate.

Implementation Plan

Edited by Michael Becker