diff --git a/db/docs/batched_background_migrations/backfill_organization_id_on_ci_runner_machines.yml b/db/docs/batched_background_migrations/backfill_organization_id_on_ci_runner_machines.yml index 646e3a484907d3090780ef86619c1d9f1a8e6064..823a1fefdd5094d8f7832f583364d62eec777539 100644 --- a/db/docs/batched_background_migrations/backfill_organization_id_on_ci_runner_machines.yml +++ b/db/docs/batched_background_migrations/backfill_organization_id_on_ci_runner_machines.yml @@ -1,9 +1,11 @@ --- migration_job_name: BackfillOrganizationIdOnCiRunnerMachines -description: > - Backfill organization_id column for machines associated with non-instance type runners with default organization id +description: 'Backfill organization_id column for machines associated with non-instance + type runners with default organization id + + ' feature_category: fleet_visibility introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/193195 milestone: '18.2' queued_migration_version: 20250602183870 -finalized_by: # version of the migration that finalized this BBM +finalized_by: '20250717233145' diff --git a/db/post_migrate/20250717233145_finalize_hk_backfill_organization_id_on_ci_runner_machines.rb b/db/post_migrate/20250717233145_finalize_hk_backfill_organization_id_on_ci_runner_machines.rb new file mode 100644 index 0000000000000000000000000000000000000000..88744d4b3333f8bc00db5bb2047cbb27f965a249 --- /dev/null +++ b/db/post_migrate/20250717233145_finalize_hk_backfill_organization_id_on_ci_runner_machines.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeHkBackfillOrganizationIdOnCiRunnerMachines < Gitlab::Database::Migration[2.3] + milestone '18.3' + + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_ci + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'BackfillOrganizationIdOnCiRunnerMachines', + table_name: :ci_runner_machines, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down; end +end diff --git a/db/schema_migrations/20250717233145 b/db/schema_migrations/20250717233145 new file mode 100644 index 0000000000000000000000000000000000000000..6730f82e79372b1655a8e66e409bf19aa04bda3c --- /dev/null +++ b/db/schema_migrations/20250717233145 @@ -0,0 +1 @@ +00df514bd31f7c689f3643e566fcfb2a20b7fa7b4ae684c88060c9ea219807db \ No newline at end of file