diff options
Diffstat (limited to 'lib/gitlab/background_migration/rebalance_partition_id.rb')
-rw-r--r-- | lib/gitlab/background_migration/rebalance_partition_id.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/lib/gitlab/background_migration/rebalance_partition_id.rb b/lib/gitlab/background_migration/rebalance_partition_id.rb deleted file mode 100644 index 7000ae5a856..00000000000 --- a/lib/gitlab/background_migration/rebalance_partition_id.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -module Gitlab - module BackgroundMigration - # This rebalances partition_id to fix invalid records in production - class RebalancePartitionId < BatchedMigrationJob - INVALID_PARTITION_ID = 101 - VALID_PARTITION_ID = 100 - - scope_to ->(relation) { relation.where(partition_id: INVALID_PARTITION_ID) } - operation_name :update_all - feature_category :continuous_integration - - def perform - each_sub_batch do |sub_batch| - sub_batch.update_all(partition_id: VALID_PARTITION_ID) - end - end - end - end -end |