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-02 18:10:19 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2024-01-02 18:10:19 +0300
commitcef74ed0434b53fde0d7dcc2507b6f1639a63e7d (patch)
tree300bc30b6c4272cba3ab65297ede18bfffba2bd2 /db/post_migrate
parentecdd26856c46b1e9e0c500701b36b6ae338e18a0 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20231221223259_queue_drop_vulnerabilities_without_finding_id.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/db/post_migrate/20231221223259_queue_drop_vulnerabilities_without_finding_id.rb b/db/post_migrate/20231221223259_queue_drop_vulnerabilities_without_finding_id.rb
new file mode 100644
index 00000000000..25aa2912767
--- /dev/null
+++ b/db/post_migrate/20231221223259_queue_drop_vulnerabilities_without_finding_id.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class QueueDropVulnerabilitiesWithoutFindingId < Gitlab::Database::Migration[2.2]
+ milestone '16.8'
+
+ MIGRATION = "DropVulnerabilitiesWithoutFindingId"
+ 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,
+ :vulnerabilities,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :vulnerabilities, :id, [])
+ end
+end