diff --git a/db/docs/batched_background_migrations/backfill_work_item_parent_links_namespace_id.yml b/db/docs/batched_background_migrations/backfill_work_item_parent_links_namespace_id.yml index c8736c2c71151cb5557abc69c6f9034d98adf76b..a6895f85c6c1f720e47218b4638a8c821cca1afc 100644 --- a/db/docs/batched_background_migrations/backfill_work_item_parent_links_namespace_id.yml +++ b/db/docs/batched_background_migrations/backfill_work_item_parent_links_namespace_id.yml @@ -5,4 +5,4 @@ feature_category: team_planning introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/150075 milestone: '17.0' queued_migration_version: 20240419035508 -finalized_by: # version of the migration that finalized this BBM +finalized_by: '20241103232115' diff --git a/db/post_migrate/20241103232115_finalize_backfill_work_item_parent_links_namespace_id.rb b/db/post_migrate/20241103232115_finalize_backfill_work_item_parent_links_namespace_id.rb new file mode 100644 index 0000000000000000000000000000000000000000..2af37e7d4ffd7eaff3587a0fcc1b4eac86b8d4b5 --- /dev/null +++ b/db/post_migrate/20241103232115_finalize_backfill_work_item_parent_links_namespace_id.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeBackfillWorkItemParentLinksNamespaceId < Gitlab::Database::Migration[2.2] + milestone '17.6' + + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_main_cell + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'BackfillWorkItemParentLinksNamespaceId', + table_name: :work_item_parent_links, + column_name: :id, + job_arguments: [:namespace_id, :issues, :namespace_id, :work_item_id], + finalize: true + ) + end + + def down; end +end diff --git a/db/schema_migrations/20241103232115 b/db/schema_migrations/20241103232115 new file mode 100644 index 0000000000000000000000000000000000000000..ac61dc63d81730071b08a1bb4a549d0f4e116f3e --- /dev/null +++ b/db/schema_migrations/20241103232115 @@ -0,0 +1 @@ +067cfb58537fd6238feda2d20eab221b06ab4c45e7802714be6afb55aca20f09 \ No newline at end of file