2022-06-21 17:19:12 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
# This migration acts as a gate-keeper for other migrations related to project namespace back-filling
|
|
|
|
# so that other migrations that depend on project namespace back-filling cannot be run unless project namespace
|
|
|
|
# back-filling has finalized successfully.
|
|
|
|
class FinalizeProjectNamespacesBackfill < Gitlab::Database::Migration[1.0]
|
2022-07-23 23:45:48 +05:30
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2022-06-21 17:19:12 +05:30
|
|
|
MIGRATION = 'ProjectNamespaces::BackfillProjectNamespaces'
|
|
|
|
|
|
|
|
def up
|
|
|
|
ensure_batched_background_migration_is_finished(
|
|
|
|
job_class_name: MIGRATION,
|
|
|
|
table_name: :projects,
|
|
|
|
column_name: :id,
|
|
|
|
job_arguments: [nil, 'up']
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
# noop
|
|
|
|
end
|
|
|
|
end
|