Add organization_id to sbom_component_versions
What does this MR do and why?
- Add
organization_idcolumn tosbom_component_versionstable. - Make
organization_idthe sharding key forsbom_component_versionsto support Cells. - Declare
organization_idas a loose foreign key to supportgitlab_secdecomposition - Change the ingestion task for
Sbom::ComponentVersionmodels to set theorganization_idupon ingestion.
It's not necessary to replace to add organization_id to the unique index on (component_id, version).
That's because components referenced by the component_id foreign key are already local to an organization.
See #469435 (comment 2092272041)
Related to #469435 (closed)
Edited by Fabien Catteau