diff --git a/db/docs/batched_background_migrations/backfill_protected_environment_deploy_access_levels_protected_environment_project_id.yml b/db/docs/batched_background_migrations/backfill_protected_environment_deploy_access_levels_protected_environment_project_id.yml
index 420ca95b0eb0de9f78cb1405c8653785941bef24..15378aacb000420378ba6cb5f4a5430eb0d8e95c 100644
--- a/db/docs/batched_background_migrations/backfill_protected_environment_deploy_access_levels_protected_environment_project_id.yml
+++ b/db/docs/batched_background_migrations/backfill_protected_environment_deploy_access_levels_protected_environment_project_id.yml
@@ -1,8 +1,9 @@
 ---
 migration_job_name: BackfillProtectedEnvironmentDeployAccessLevelsProtectedEnvironmentProjectId
-description: Backfills sharding key `protected_environment_deploy_access_levels.protected_environment_project_id` from `protected_environments`.
+description: Backfills sharding key `protected_environment_deploy_access_levels.protected_environment_project_id`
+  from `protected_environments`.
 feature_category: continuous_delivery
 introduced_by_url: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/162834
 milestone: '17.4'
 queued_migration_version: 20240815083838
-finalized_by: # version of the migration that finalized this BBM
+finalized_by: '20250303231605'
diff --git a/db/post_migrate/20250303231605_finalize_hk_backfill_protected_environment_deploy_access_levels_protected66570.rb b/db/post_migrate/20250303231605_finalize_hk_backfill_protected_environment_deploy_access_levels_protected66570.rb
new file mode 100644
index 0000000000000000000000000000000000000000..758d7deb3c6400b35aaca9895c10ef6cbf0b37ba
--- /dev/null
+++ b/db/post_migrate/20250303231605_finalize_hk_backfill_protected_environment_deploy_access_levels_protected66570.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+
+class FinalizeHkBackfillProtectedEnvironmentDeployAccessLevelsProtected66570 < 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: 'BackfillProtectedEnvironmentDeployAccessLevelsProtectedEnvironmentProjectId',
+      table_name: :protected_environment_deploy_access_levels,
+      column_name: :id,
+      job_arguments: [:protected_environment_project_id, :protected_environments, :project_id,
+        :protected_environment_id],
+      finalize: true
+    )
+  end
+
+  def down; end
+end
diff --git a/db/schema_migrations/20250303231605 b/db/schema_migrations/20250303231605
new file mode 100644
index 0000000000000000000000000000000000000000..89ab9ebad38e3adc24f4963a69a57b8586c93431
--- /dev/null
+++ b/db/schema_migrations/20250303231605
@@ -0,0 +1 @@
+9405413ee762e9b5ad018de4c92b5613f19d5e85f81b35a7e69c537d3e8f43ba
\ No newline at end of file