Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb')
-rw-r--r--db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb25
1 files changed, 0 insertions, 25 deletions
diff --git a/db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb b/db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb
deleted file mode 100644
index 49c9efc497c..00000000000
--- a/db/post_migrate/20220204095121_backfill_namespace_statistics_with_dependency_proxy_size.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-# frozen_string_literal: true
-
-class BackfillNamespaceStatisticsWithDependencyProxySize < Gitlab::Database::Migration[1.0]
- DELAY_INTERVAL = 2.minutes.to_i
- BATCH_SIZE = 500
- MIGRATION = 'PopulateNamespaceStatistics'
-
- disable_ddl_transaction!
-
- def up
- groups = exec_query <<~SQL
- SELECT dependency_proxy_manifests.group_id FROM dependency_proxy_manifests
- UNION
- SELECT dependency_proxy_blobs.group_id from dependency_proxy_blobs
- SQL
-
- groups.rows.flatten.in_groups_of(BATCH_SIZE, false).each_with_index do |group_ids, index|
- migrate_in(index * DELAY_INTERVAL, MIGRATION, [group_ids, [:dependency_proxy_size]])
- end
- end
-
- def down
- # no-op
- end
-end