diff --git a/db/docs/batched_background_migrations/backfill_ml_candidate_params_project_id.yml b/db/docs/batched_background_migrations/backfill_ml_candidate_params_project_id.yml index cc28b212f17ecb5fbcf09bc79938b235186b5ca2..f2936fc8cace3db9d918a4eef8a1485f44391e14 100644 --- a/db/docs/batched_background_migrations/backfill_ml_candidate_params_project_id.yml +++ b/db/docs/batched_background_migrations/backfill_ml_candidate_params_project_id.yml @@ -5,4 +5,4 @@ feature_category: mlops introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/165336 milestone: '17.4' queued_migration_version: 20240906131415 -finalized_by: # version of the migration that finalized this BBM +finalized_by: '20250302231854' diff --git a/db/post_migrate/20250302231854_finalize_hk_backfill_ml_candidate_params_project_id.rb b/db/post_migrate/20250302231854_finalize_hk_backfill_ml_candidate_params_project_id.rb new file mode 100644 index 0000000000000000000000000000000000000000..e5232b796e90f8a529af533d55705851e914c1a2 --- /dev/null +++ b/db/post_migrate/20250302231854_finalize_hk_backfill_ml_candidate_params_project_id.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeHkBackfillMlCandidateParamsProjectId < Gitlab::Database::Migration[2.2] + milestone '17.10' + + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_main_cell + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'BackfillMlCandidateParamsProjectId', + table_name: :ml_candidate_params, + column_name: :id, + job_arguments: [:project_id, :ml_candidates, :project_id, :candidate_id], + finalize: true + ) + end + + def down; end +end diff --git a/db/schema_migrations/20250302231854 b/db/schema_migrations/20250302231854 new file mode 100644 index 0000000000000000000000000000000000000000..f30afb90a2486be6c869d287d232bb203ae4ca50 --- /dev/null +++ b/db/schema_migrations/20250302231854 @@ -0,0 +1 @@ +200a96d5653c314ed9005d8e8027b7ec378ddd2ce76156c9fba450fe741881dd \ No newline at end of file