blob: 2f82d5dbb21bc8c801be60c2d9c85e0b321ccaec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
# frozen_string_literal: true
class EnsureBackfillForSharedRunnersDurationIsFinished < Gitlab::Database::Migration[2.1]
restrict_gitlab_migration gitlab_schema: :gitlab_ci
disable_ddl_transaction!
TABLE_NAMES = %i[ci_project_monthly_usages ci_namespace_monthly_usages]
def up
TABLE_NAMES.each do |table_name|
ensure_batched_background_migration_is_finished(
job_class_name: 'CopyColumnUsingBackgroundMigrationJob',
table_name: table_name,
column_name: 'id',
job_arguments: [
%w[shared_runners_duration],
%w[shared_runners_duration_convert_to_bigint]
]
)
end
end
def down
# no-op
end
end
|