Skip to content

Add organization to vulnerability_exports to set sharding key

Subashis Chakraborty requested to merge 457095-add-sharding-key into master

Records in vulnerability_exports table can be associated with a project, group, or nothing. There are foreign keys to projects and namespaces but those can be nullable.

In the discussion of discovery issue, we decided to scope this to organization. So we need to add organization to the mentioned table and then set organization_id as sharding key.

We don't need a backfill as suggested here and organization_id can be set to default value to 1 .

Related to #457095 (closed)

Edited by Subashis Chakraborty

Merge request reports