Migration: Disable push mirrors exceeding the per-project limit
## Overview Create a database migration to disable push mirrors that exceed the per-project limit of 10 enabled mirrors. ## Context As part of [!221965](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/221965), we're enforcing an upper limit of 10 enabled push mirrors per project. However, there are existing projects with more than 10 mirrors: - 265 projects have >10 mirrors - 40 projects have >20 mirrors - 3 projects have >100 mirrors ## Solution This migration should: 1. Identify all projects with more than 10 enabled push mirrors 2. For each project, disable mirrors beyond the first 10 (ordered by ID) 3. Ensure the migration is idempotent and safe to run multiple times ## Implementation Details The migration should: - Query projects with enabled mirrors count > 10 - For each project, disable mirrors with ID > the 10th mirror's ID - Log the number of mirrors disabled for audit purposes ## Related Issues - Related to [#580289](https://gitlab.com/gitlab-org/gitlab/-/issues/580289) - Depends on [!221965](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/221965) ## Acceptance Criteria - [ ] Migration successfully disables excess mirrors - [ ] Migration is idempotent - [ ] No data loss occurs - [ ] Migration includes appropriate logging - [ ] Tests verify the migration behavior
issue