Add vulnerability_occurrence_id to to tables that should relate to a vulnerability in a ref context

In the process of the paradigm shift for our data model, vulnerability_occurrences will become the key representation of vulnerabilities within a codebase.

As a result, tables that contain supporting information for these records need to be updated to contain a reference to their appropriately ref contextual vulnerability_occurrence . These tables are as follows:

  • vulnerability_external_issue_links
  • vulnerability_issue_links
  • vulnerability_merge_request_links
  • vulnerability_reads
  • vulnerability_severity_overrides
  • vulnerability_state_transitions
  • sbom_occurrences_vulnerabilities
  • vulnerability_representation_information
  • vulnerability_user_mentions

Each of these tables will need to have a vulnerability_occurrences record associated with it. In a follow up we can backfill this value with the only vulnerability_occurrence .

Edited by 🤖 GitLab Bot 🤖