diff --git a/db/docs/batched_background_migrations/backfill_has_vulnerability_resolution.yml b/db/docs/batched_background_migrations/backfill_has_vulnerability_resolution.yml index dc37059029f5101b7446ad2f6a40ee3f723631cf..d7ae69bab86e26f71bb5ab04e07b37a662f28586 100644 --- a/db/docs/batched_background_migrations/backfill_has_vulnerability_resolution.yml +++ b/db/docs/batched_background_migrations/backfill_has_vulnerability_resolution.yml @@ -10,4 +10,4 @@ feature_category: vulnerability_management introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/166110 milestone: '17.5' queued_migration_version: 20240912184158 -finalized_by: # version of the migration that finalized this BBM +finalized_by: 20241025010332 diff --git a/db/post_migrate/20241025010332_finalize_backfill_has_vulnerability_resolution.rb b/db/post_migrate/20241025010332_finalize_backfill_has_vulnerability_resolution.rb new file mode 100644 index 0000000000000000000000000000000000000000..99159fe2be7a7db2e12a42fa282bfcda533a32bf --- /dev/null +++ b/db/post_migrate/20241025010332_finalize_backfill_has_vulnerability_resolution.rb @@ -0,0 +1,23 @@ +# frozen_string_literal: true + +class FinalizeBackfillHasVulnerabilityResolution < Gitlab::Database::Migration[2.2] + MIGRATION = 'BackfillHasVulnerabilityResolution' + + disable_ddl_transaction! + restrict_gitlab_migration gitlab_schema: :gitlab_main + milestone '17.6' + + def up + ensure_batched_background_migration_is_finished( + job_class_name: MIGRATION, + table_name: :vulnerability_reads, + column_name: :id, + job_arguments: [], + finalize: true + ) + end + + def down + # no op + end +end diff --git a/db/schema_migrations/20241025010332 b/db/schema_migrations/20241025010332 new file mode 100644 index 0000000000000000000000000000000000000000..db615bcf311ce9c9c3ef74a349b254fa5629c14f --- /dev/null +++ b/db/schema_migrations/20241025010332 @@ -0,0 +1 @@ +219459af48a3bdd8be64ba0cb8386dc6c2285b3106bda3ee5a83581cafa60d49 \ No newline at end of file