summaryrefslogtreecommitdiff
path: root/db/post_migrate/20230420041344_backfill_ci_pipelines_for_bigint_conversion.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-02 12:18:53 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-02 12:18:53 +0000
commit51d59a3538b97d85ebb46039044d3f498809b55a (patch)
treed574af08cc1e2ef8fa8337a0850fa36a7b9ab527 /db/post_migrate/20230420041344_backfill_ci_pipelines_for_bigint_conversion.rb
parent74da249f7e22c20e144ba3c044c6bdeb5df86cd4 (diff)
downloadgitlab-ce-51d59a3538b97d85ebb46039044d3f498809b55a.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/post_migrate/20230420041344_backfill_ci_pipelines_for_bigint_conversion.rb')
-rw-r--r--db/post_migrate/20230420041344_backfill_ci_pipelines_for_bigint_conversion.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/db/post_migrate/20230420041344_backfill_ci_pipelines_for_bigint_conversion.rb b/db/post_migrate/20230420041344_backfill_ci_pipelines_for_bigint_conversion.rb
new file mode 100644
index 00000000000..7e9d900eeca
--- /dev/null
+++ b/db/post_migrate/20230420041344_backfill_ci_pipelines_for_bigint_conversion.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+
+class BackfillCiPipelinesForBigintConversion < Gitlab::Database::Migration[2.1]
+ restrict_gitlab_migration gitlab_schema: :gitlab_ci
+
+ TABLE = :ci_pipelines
+ COLUMNS = %i[id]
+
+ def up
+ backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS, sub_batch_size: 250)
+ end
+
+ def down
+ revert_backfill_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+end