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:
authorGitLab Bot <gitlab-bot@gitlab.com>2024-01-04 15:19:41 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-04 15:19:41 +0300
commitac72b79188a14a28eafe55d32641f9939cf5d9c4 (patch)
treed6f6f349fb30017a600ebdee07b832889615978e /db/post_migrate
parent8f89276d8498f45459bca67493eccd1bdf055330 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20231212135235_queue_backfill_vs_code_settings_version.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/db/post_migrate/20231212135235_queue_backfill_vs_code_settings_version.rb b/db/post_migrate/20231212135235_queue_backfill_vs_code_settings_version.rb
new file mode 100644
index 00000000000..db2704c3c33
--- /dev/null
+++ b/db/post_migrate/20231212135235_queue_backfill_vs_code_settings_version.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class QueueBackfillVsCodeSettingsVersion < Gitlab::Database::Migration[2.2]
+ milestone '16.7'
+
+ MIGRATION = "BackfillVsCodeSettingsVersion"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 1000
+ SUB_BATCH_SIZE = 100
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ queue_batched_background_migration(
+ MIGRATION,
+ :vs_code_settings,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :vs_code_settings, :id, [])
+ end
+end