Backfill vulnerability_occurrence_id to finding associations

What does this MR do and why?

As part of the vulnerabilities on multiple branches project, we are changing the relations for many models to be related to vulnerability_occurrences instead of vulnerabilities. In !214280 (merged), we began setting the vulnerability_occurrence_id for new records. This MR backfills the data for existing records.

Tables not included in this migration:

  • sbom_occurrence_vulnerabilities - We are not setting this ID during ingestion yet.
  • vulnerability_user_mentions - We still need to figure out how we are migrating this table.

References

Relates to: #556203 (closed)

Screenshots or screen recordings

Before After

How to set up and validate locally

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Brian Williams (Ex-GitLab)

Merge request reports

Loading
Loading