diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-14 11:41:52 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-11-14 11:41:52 +0300 |
commit | 585826cb22ecea5998a2c2a4675735c94bdeedac (patch) | |
tree | 5b05f0b30d33cef48963609e8a18a4dff260eab3 /db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb | |
parent | df221d036e5d0c6c0ee4d55b9c97f481ee05dee8 (diff) |
Add latest changes from gitlab-org/gitlab@16-6-stable-eev16.6.0-rc42
Diffstat (limited to 'db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb')
-rw-r--r-- | db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb b/db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb new file mode 100644 index 00000000000..3f4009d783c --- /dev/null +++ b/db/post_migrate/20231016173129_queue_delete_invalid_protected_branch_merge_access_levels.rb @@ -0,0 +1,28 @@ +# frozen_string_literal: true + +class QueueDeleteInvalidProtectedBranchMergeAccessLevels < Gitlab::Database::Migration[2.1] + MIGRATION = "DeleteInvalidProtectedBranchMergeAccessLevels" + DELAY_INTERVAL = 2.minutes + MAX_BATCH_SIZE = 10_000 + BATCH_SIZE = 5_000 + SUB_BATCH_SIZE = 500 + + disable_ddl_transaction! + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + queue_batched_background_migration( + MIGRATION, + :protected_branch_merge_access_levels, + :id, + job_interval: DELAY_INTERVAL, + queued_migration_version: '20231016173129', + batch_size: BATCH_SIZE, + sub_batch_size: SUB_BATCH_SIZE + ) + end + + def down + delete_batched_background_migration(MIGRATION, :protected_branch_merge_access_levels, :id, []) + end +end |