Backfill organization_id for keys table

What does this MR do and why?

This MR implements a batched background migration to backfill the organization_id column in the keys table, supporting the organization-level data model.

Key changes:

  • Backfills organization_id for SSH keys from their associated users
  • Backfills organization_id for deploy keys from their associated projects (via deploy_keys_projects)
  • Assigns orphaned deploy keys (without project associations) to the default organization
  • Processes records in batches to minimize database impact

Changelog: changed

References

Fixes: #577245 (closed)

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 Aboobacker MK

Merge request reports

Loading