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/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb')
-rw-r--r--db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb b/db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb
new file mode 100644
index 00000000000..5880124d0a6
--- /dev/null
+++ b/db/post_migrate/20231016194943_queue_delete_invalid_protected_tag_create_access_levels.rb
@@ -0,0 +1,27 @@
+# frozen_string_literal: true
+
+class QueueDeleteInvalidProtectedTagCreateAccessLevels < Gitlab::Database::Migration[2.1]
+ MIGRATION = "DeleteInvalidProtectedTagCreateAccessLevels"
+ DELAY_INTERVAL = 2.minutes
+ BATCH_SIZE = 10_000
+ SUB_BATCH_SIZE = 500
+
+ disable_ddl_transaction!
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ def up
+ queue_batched_background_migration(
+ MIGRATION,
+ :protected_tag_create_access_levels,
+ :id,
+ job_interval: DELAY_INTERVAL,
+ queued_migration_version: '20231016194943',
+ batch_size: BATCH_SIZE,
+ sub_batch_size: SUB_BATCH_SIZE
+ )
+ end
+
+ def down
+ delete_batched_background_migration(MIGRATION, :protected_tag_create_access_levels, :id, [])
+ end
+end