diff --git a/db/docs/batched_background_migrations/remove_orphaned_vulnerability_notes_batched_migration.yml b/db/docs/batched_background_migrations/remove_orphaned_vulnerability_notes_batched_migration.yml index b2b5c223f909dbf9a6dda6a2a6803acf1085b6bb..469683d58f24a0e203964b85b4e50f4c55757c99 100644 --- a/db/docs/batched_background_migrations/remove_orphaned_vulnerability_notes_batched_migration.yml +++ b/db/docs/batched_background_migrations/remove_orphaned_vulnerability_notes_batched_migration.yml @@ -5,4 +5,4 @@ feature_category: vulnerability_management introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/180624 milestone: '17.10' queued_migration_version: 20250304184254 -finalized_by: # version of the migration that finalized this BBM +finalized_by: '20250717232258' diff --git a/db/post_migrate/20250717232258_finalize_hk_remove_orphaned_vulnerability_notes_batched_migration.rb b/db/post_migrate/20250717232258_finalize_hk_remove_orphaned_vulnerability_notes_batched_migration.rb new file mode 100644 index 0000000000000000000000000000000000000000..bd76e5c9eab830b0900f0e7561fad211f0505947 --- /dev/null +++ b/db/post_migrate/20250717232258_finalize_hk_remove_orphaned_vulnerability_notes_batched_migration.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +class FinalizeHkRemoveOrphanedVulnerabilityNotesBatchedMigration < Gitlab::Database::Migration[2.3] + milestone '18.3' + + disable_ddl_transaction! + + restrict_gitlab_migration gitlab_schema: :gitlab_main + + def up + ensure_batched_background_migration_is_finished( + job_class_name: 'RemoveOrphanedVulnerabilityNotesBatchedMigration', + table_name: :notes, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down; end +end diff --git a/db/schema_migrations/20250717232258 b/db/schema_migrations/20250717232258 new file mode 100644 index 0000000000000000000000000000000000000000..68dfea34fe0f4475090c857009ebe050794443ff --- /dev/null +++ b/db/schema_migrations/20250717232258 @@ -0,0 +1 @@ +24973c46f159fd0721e5ddcabafdef14d2df6ea6f6e8ed801a6ab90a61057011 \ No newline at end of file