diff --git a/db/docs/batched_background_migrations/backfill_partition_id_ci_pipeline_chat_data.yml b/db/docs/batched_background_migrations/backfill_partition_id_ci_pipeline_chat_data.yml
index 9cf851d91041b26da018505f023de2ca2b701789..5864ef96ca3b5866336f68955d9e26c2373506c6 100644
--- a/db/docs/batched_background_migrations/backfill_partition_id_ci_pipeline_chat_data.yml
+++ b/db/docs/batched_background_migrations/backfill_partition_id_ci_pipeline_chat_data.yml
@@ -6,4 +6,4 @@ introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/139515
 milestone: '16.8'
 queued_migration_version: 20231218092401
 finalize_after: '2023-12-23'
-finalized_by: # version of the migration that finalized this BBM
+finalized_by: 20240104101601
diff --git a/db/post_migrate/20240104101601_finalize_backfill_partition_id_ci_pipeline_chat_data.rb b/db/post_migrate/20240104101601_finalize_backfill_partition_id_ci_pipeline_chat_data.rb
new file mode 100644
index 0000000000000000000000000000000000000000..45da0e9c12aa05f2aee65dce8cf1413617ac7fb2
--- /dev/null
+++ b/db/post_migrate/20240104101601_finalize_backfill_partition_id_ci_pipeline_chat_data.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class FinalizeBackfillPartitionIdCiPipelineChatData < Gitlab::Database::Migration[2.2]
+  milestone '16.8'
+  MIGRATION = 'BackfillPartitionIdCiPipelineChatData'
+  disable_ddl_transaction!
+
+  restrict_gitlab_migration gitlab_schema: :gitlab_ci
+
+  def up
+    ensure_batched_background_migration_is_finished(
+      job_class_name: MIGRATION,
+      table_name: :ci_pipeline_chat_data,
+      column_name: :id,
+      job_arguments: [],
+      finalize: true
+    )
+  end
+
+  def down
+    # no-op
+  end
+end
diff --git a/db/schema_migrations/20240104101601 b/db/schema_migrations/20240104101601
new file mode 100644
index 0000000000000000000000000000000000000000..06c9bee807e07d1e6b24e909368092468eaaf385
--- /dev/null
+++ b/db/schema_migrations/20240104101601
@@ -0,0 +1 @@
+729cc1d2d73610b8e1a8efec30635dded7c85ece9afdc40e24ed60ddd82c4068
\ No newline at end of file