Update import_failures sharding

What does this MR do and why?

As part of the cells preparation, the import & integrate team needs to set the sharding key for a few tables, and clean up any old data as well as setting appropriate foreign keys and database checks. The original MR to do this has been broken up into individual MRs per table as suggested during the review process, to make reviewing easier.

In this MR, we ensure the ImportFailure gets an organization_id assigned to it if no project_id or group_id exists. It also sets those 3 columns to the sharding keys and adds a check to ensure they are not all null.

MR acceptance checklist

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

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #463854 (closed)

Edited by Keeyan Nejad

Merge request reports

Loading