diff --git a/lib/generators/batched_background_migration/templates/queue_batched_background_migration_spec.template b/lib/generators/batched_background_migration/templates/queue_batched_background_migration_spec.template
index e0a3078114e6546fe2a30400c85568b9d217dd65..cd573d8aafd26b4054dd31fbba132b87e3181222 100644
--- a/lib/generators/batched_background_migration/templates/queue_batched_background_migration_spec.template
+++ b/lib/generators/batched_background_migration/templates/queue_batched_background_migration_spec.template
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe <%= migration_class_name %>, feature_category: :<%= feature_category.to_sym %> do
+RSpec.describe <%= migration_class_name %>, migration: :gitlab_?, feature_category: :<%= feature_category.to_sym %> do
   # let!(:batched_migration) { described_class::MIGRATION }
 
   # it 'schedules a new batched migration' do
@@ -14,6 +14,7 @@ RSpec.describe <%= migration_class_name %>, feature_category: :<%= feature_categ
 
   #     migration.after -> {
   #       expect(batched_migration).to have_scheduled_batched_migration(
+  #         gitlab_schema: # :gitlab_main / :gitlab_ci / :gitlab_main_clusterwide / ...
   #         table_name: :<%= table_name %>,
   #         column_name: :<%= column_name %>,
   #         interval: described_class::DELAY_INTERVAL,
diff --git a/spec/lib/generators/batched_background_migration/expected_files/queue_my_batched_migration_spec.txt b/spec/lib/generators/batched_background_migration/expected_files/queue_my_batched_migration_spec.txt
index 6f33de4ae835be8463a59c4bcaf03db5f0946b59..913ba12d42c8cd14311d20f689648f0469805992 100644
--- a/spec/lib/generators/batched_background_migration/expected_files/queue_my_batched_migration_spec.txt
+++ b/spec/lib/generators/batched_background_migration/expected_files/queue_my_batched_migration_spec.txt
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueMyBatchedMigration, feature_category: :database do
+RSpec.describe QueueMyBatchedMigration, migration: :gitlab_?, feature_category: :database do
   # let!(:batched_migration) { described_class::MIGRATION }
 
   # it 'schedules a new batched migration' do
@@ -14,6 +14,7 @@ RSpec.describe QueueMyBatchedMigration, feature_category: :database do
 
   #     migration.after -> {
   #       expect(batched_migration).to have_scheduled_batched_migration(
+  #         gitlab_schema: # :gitlab_main / :gitlab_ci / :gitlab_main_clusterwide / ...
   #         table_name: :projects,
   #         column_name: :id,
   #         interval: described_class::DELAY_INTERVAL,
diff --git a/spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb b/spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb
index 7c391d95fed1a2e2d226fcc93f6ee97c34abc281..7d8370b6301b13cce43b2cf03bb9ac1ee8620a63 100644
--- a/spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb
+++ b/spec/lib/gitlab/database/partitioning_migration_helpers/table_management_helpers_spec.rb
@@ -195,6 +195,7 @@
 
   before do
     allow(migration).to receive(:puts)
+    allow(described_class).to receive(:allowed_gitlab_schemas).and_return([:gitlab_main])
 
     migration.create_table source_table do |t|
       t.string :name, null: false
diff --git a/spec/migrations/20240214203242_queue_backfill_sbom_occurrences_traversal_ids_and_archived_spec.rb b/spec/migrations/20240214203242_queue_backfill_sbom_occurrences_traversal_ids_and_archived_spec.rb
index fbdebd39637b85541e9e5f3eac8d27e8d7afab32..410109a9ff9eada2b066cf51e7da13931be8ed29 100644
--- a/spec/migrations/20240214203242_queue_backfill_sbom_occurrences_traversal_ids_and_archived_spec.rb
+++ b/spec/migrations/20240214203242_queue_backfill_sbom_occurrences_traversal_ids_and_archived_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillSbomOccurrencesTraversalIdsAndArchived, feature_category: :dependency_management do
+RSpec.describe QueueBackfillSbomOccurrencesTraversalIdsAndArchived, migration: :gitlab_sec,
+  feature_category: :dependency_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240223130548_queue_update_sbom_components_name_based_on_pep503_spec.rb b/spec/migrations/20240223130548_queue_update_sbom_components_name_based_on_pep503_spec.rb
index 5ded14185c8fca8a64dc698f73a97a1c12aece49..ab6fdb1eb4a11026103378c9a1da34325274700f 100644
--- a/spec/migrations/20240223130548_queue_update_sbom_components_name_based_on_pep503_spec.rb
+++ b/spec/migrations/20240223130548_queue_update_sbom_components_name_based_on_pep503_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueUpdateSbomComponentsNameBasedOnPep503, feature_category: :software_composition_analysis do
+RSpec.describe QueueUpdateSbomComponentsNameBasedOnPep503, migration: :gitlab_sec,
+  feature_category: :software_composition_analysis do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240226143323_queue_backup_and_remove_notes_with_null_noteable_type_spec.rb b/spec/migrations/20240226143323_queue_backup_and_remove_notes_with_null_noteable_type_spec.rb
index 9f36768f2e82e027d70da4eac296fe682408d030..5550eb20881be16d87f2cc1fc3ffb98e6e93b73a 100644
--- a/spec/migrations/20240226143323_queue_backup_and_remove_notes_with_null_noteable_type_spec.rb
+++ b/spec/migrations/20240226143323_queue_backup_and_remove_notes_with_null_noteable_type_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackupAndRemoveNotesWithNullNoteableType, feature_category: :team_planning do
+RSpec.describe QueueBackupAndRemoveNotesWithNullNoteableType, migration: :gitlab_main_cell,
+  feature_category: :team_planning do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240306120522_queue_update_sbom_occurrences_component_name_based_on_pep503_spec.rb b/spec/migrations/20240306120522_queue_update_sbom_occurrences_component_name_based_on_pep503_spec.rb
index d9eb63acdfbf7b744a7111670c92f568b1889d8f..669b51ec9bd6b73af6b92b5668a14cc04f88d8a0 100644
--- a/spec/migrations/20240306120522_queue_update_sbom_occurrences_component_name_based_on_pep503_spec.rb
+++ b/spec/migrations/20240306120522_queue_update_sbom_occurrences_component_name_based_on_pep503_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueUpdateSbomOccurrencesComponentNameBasedOnPep503, feature_category: :software_composition_analysis do
+RSpec.describe QueueUpdateSbomOccurrencesComponentNameBasedOnPep503, migration: :gitlab_sec,
+  feature_category: :software_composition_analysis do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240410004337_queue_backfill_deployment_approvals_project_id_spec.rb b/spec/migrations/20240410004337_queue_backfill_deployment_approvals_project_id_spec.rb
index 7ee693fc24fa71d01ec2f1402b6e1dd64763824d..aec6d73872e483fbd17d2e1ef9aaad5341522fa6 100644
--- a/spec/migrations/20240410004337_queue_backfill_deployment_approvals_project_id_spec.rb
+++ b/spec/migrations/20240410004337_queue_backfill_deployment_approvals_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillDeploymentApprovalsProjectId, feature_category: :continuous_delivery do
+RSpec.describe QueueBackfillDeploymentApprovalsProjectId, migration: :gitlab_main_cell,
+  feature_category: :continuous_delivery do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240501044351_queue_backfill_approval_merge_request_rules_project_id_spec.rb b/spec/migrations/20240501044351_queue_backfill_approval_merge_request_rules_project_id_spec.rb
index 7d1c0405cf6862025782b93642b291a35706bda7..7a504ce23821a929898f51a01a0b13d51d4b108a 100644
--- a/spec/migrations/20240501044351_queue_backfill_approval_merge_request_rules_project_id_spec.rb
+++ b/spec/migrations/20240501044351_queue_backfill_approval_merge_request_rules_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillApprovalMergeRequestRulesProjectId, feature_category: :code_review_workflow do
+RSpec.describe QueueBackfillApprovalMergeRequestRulesProjectId, migration: :gitlab_main_cell,
+  feature_category: :code_review_workflow do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240501044505_queue_backfill_approval_project_rules_users_project_id_spec.rb b/spec/migrations/20240501044505_queue_backfill_approval_project_rules_users_project_id_spec.rb
index 67536761114edcd79f2fa50d99e9f9057e6c5cb0..210a1d31d15e51dd61ef744129daaf037b15abe4 100644
--- a/spec/migrations/20240501044505_queue_backfill_approval_project_rules_users_project_id_spec.rb
+++ b/spec/migrations/20240501044505_queue_backfill_approval_project_rules_users_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillApprovalProjectRulesUsersProjectId, feature_category: :source_code_management do
+RSpec.describe QueueBackfillApprovalProjectRulesUsersProjectId, migration: :gitlab_main_cell,
+  feature_category: :source_code_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240507152320_queue_migrate_os_sbom_occurrences_to_components_without_prefix_spec.rb b/spec/migrations/20240507152320_queue_migrate_os_sbom_occurrences_to_components_without_prefix_spec.rb
index d173e2da88540837898d0fe0fc47eb068e87863b..21ed69feabbcd1ec43484b66219ccc51808a1038 100644
--- a/spec/migrations/20240507152320_queue_migrate_os_sbom_occurrences_to_components_without_prefix_spec.rb
+++ b/spec/migrations/20240507152320_queue_migrate_os_sbom_occurrences_to_components_without_prefix_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueMigrateOsSbomOccurrencesToComponentsWithoutPrefix, feature_category: :software_composition_analysis do
+RSpec.describe QueueMigrateOsSbomOccurrencesToComponentsWithoutPrefix, migration: :gitlab_sec,
+  feature_category: :software_composition_analysis do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240515155063_queue_backfill_design_management_designs_namespace_id_spec.rb b/spec/migrations/20240515155063_queue_backfill_design_management_designs_namespace_id_spec.rb
index cfecceff86845dc8e50edbc7b84fb3918a9945a2..6a4417933ec343d733c41b10029b222cc40c1924 100644
--- a/spec/migrations/20240515155063_queue_backfill_design_management_designs_namespace_id_spec.rb
+++ b/spec/migrations/20240515155063_queue_backfill_design_management_designs_namespace_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillDesignManagementDesignsNamespaceId, feature_category: :design_management do
+RSpec.describe QueueBackfillDesignManagementDesignsNamespaceId, migration: :gitlab_main_cell,
+  feature_category: :design_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240521090846_queue_backfill_boards_epic_board_labels_group_id_spec.rb b/spec/migrations/20240521090846_queue_backfill_boards_epic_board_labels_group_id_spec.rb
index e6f35f1787b2926bff05b5b5a8a0bc260d185dc2..c923612c3e47ca09cd4867e9408a3a1e28a30631 100644
--- a/spec/migrations/20240521090846_queue_backfill_boards_epic_board_labels_group_id_spec.rb
+++ b/spec/migrations/20240521090846_queue_backfill_boards_epic_board_labels_group_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillBoardsEpicBoardLabelsGroupId, feature_category: :portfolio_management do
+RSpec.describe QueueBackfillBoardsEpicBoardLabelsGroupId, migration: :gitlab_main_cell,
+  feature_category: :portfolio_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240521093524_queue_backfill_boards_epic_lists_group_id_spec.rb b/spec/migrations/20240521093524_queue_backfill_boards_epic_lists_group_id_spec.rb
index 32c1a76951dc96ce88a6d784fd968027d30da7b5..d797cabe93c1c222e648fa2d648d3298a8fab106 100644
--- a/spec/migrations/20240521093524_queue_backfill_boards_epic_lists_group_id_spec.rb
+++ b/spec/migrations/20240521093524_queue_backfill_boards_epic_lists_group_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillBoardsEpicListsGroupId, feature_category: :portfolio_management do
+RSpec.describe QueueBackfillBoardsEpicListsGroupId, migration: :gitlab_main_cell,
+  feature_category: :portfolio_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240529112047_queue_backfill_wiki_page_slugs_project_id_spec.rb b/spec/migrations/20240529112047_queue_backfill_wiki_page_slugs_project_id_spec.rb
index cfb4987106be87d448003e8502e9c5539357f807..eba6b3c5589d02fd1fa3962bf640e56b04972b94 100644
--- a/spec/migrations/20240529112047_queue_backfill_wiki_page_slugs_project_id_spec.rb
+++ b/spec/migrations/20240529112047_queue_backfill_wiki_page_slugs_project_id_spec.rb
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillWikiPageSlugsProjectId, feature_category: :wiki do
+RSpec.describe QueueBackfillWikiPageSlugsProjectId, migration: :gitlab_main_cell, feature_category: :wiki do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240529123638_queue_backfill_packages_build_infos_project_id_spec.rb b/spec/migrations/20240529123638_queue_backfill_packages_build_infos_project_id_spec.rb
index 00ff2e4b150cf8930129cc0f9f2465095231e442..357747349c2475c2b32205efe0b8691df7f8486f 100644
--- a/spec/migrations/20240529123638_queue_backfill_packages_build_infos_project_id_spec.rb
+++ b/spec/migrations/20240529123638_queue_backfill_packages_build_infos_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillPackagesBuildInfosProjectId, feature_category: :package_registry do
+RSpec.describe QueueBackfillPackagesBuildInfosProjectId, migration: :gitlab_main_cell,
+  feature_category: :package_registry do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240529185029_queue_backfill_dora_daily_metrics_project_id_spec.rb b/spec/migrations/20240529185029_queue_backfill_dora_daily_metrics_project_id_spec.rb
index c9d20beb07a9067914c011b5f1541dfe46e560dc..937d25feae3b60d7fd0ba8f9868deefd88e85f85 100644
--- a/spec/migrations/20240529185029_queue_backfill_dora_daily_metrics_project_id_spec.rb
+++ b/spec/migrations/20240529185029_queue_backfill_dora_daily_metrics_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillDoraDailyMetricsProjectId, feature_category: :continuous_delivery do
+RSpec.describe QueueBackfillDoraDailyMetricsProjectId, migration: :gitlab_main_cell,
+  feature_category: :continuous_delivery do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240530121656_queue_backfill_design_management_versions_namespace_id_spec.rb b/spec/migrations/20240530121656_queue_backfill_design_management_versions_namespace_id_spec.rb
index 4b716b9968e183e1436378a2cc5d31803f0d9ba8..9e9f9cc806b7a43102958087b80f28ab0424acbe 100644
--- a/spec/migrations/20240530121656_queue_backfill_design_management_versions_namespace_id_spec.rb
+++ b/spec/migrations/20240530121656_queue_backfill_design_management_versions_namespace_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillDesignManagementVersionsNamespaceId, feature_category: :design_management do
+RSpec.describe QueueBackfillDesignManagementVersionsNamespaceId, migration: :gitlab_main_cell,
+  feature_category: :design_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240531202753_queue_backfill_or_drop_ci_pipeline_on_project_id_spec.rb b/spec/migrations/20240531202753_queue_backfill_or_drop_ci_pipeline_on_project_id_spec.rb
index ad02215335ccb62abd3590fa4a58128985712adc..cad212f16e9730810149e953a6c0620c57642579 100644
--- a/spec/migrations/20240531202753_queue_backfill_or_drop_ci_pipeline_on_project_id_spec.rb
+++ b/spec/migrations/20240531202753_queue_backfill_or_drop_ci_pipeline_on_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillOrDropCiPipelineOnProjectId, migration: :gitlab_ci, feature_category: :continuous_integration do
+RSpec.describe QueueBackfillOrDropCiPipelineOnProjectId, migration: :gitlab_ci,
+  feature_category: :continuous_integration do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240603121642_queue_backfill_dast_pre_scan_verifications_project_id_spec.rb b/spec/migrations/20240603121642_queue_backfill_dast_pre_scan_verifications_project_id_spec.rb
index 6b33cf6ed1d1062c34d67c5996219897c815e1d0..bdfd31f262020f393208ef752143d9b25f5e2aa4 100644
--- a/spec/migrations/20240603121642_queue_backfill_dast_pre_scan_verifications_project_id_spec.rb
+++ b/spec/migrations/20240603121642_queue_backfill_dast_pre_scan_verifications_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillDastPreScanVerificationsProjectId, feature_category: :dynamic_application_security_testing do
+RSpec.describe QueueBackfillDastPreScanVerificationsProjectId, migration: :gitlab_sec,
+  feature_category: :dynamic_application_security_testing do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
@@ -19,7 +20,7 @@
           interval: described_class::DELAY_INTERVAL,
           batch_size: described_class::BATCH_SIZE,
           sub_batch_size: described_class::SUB_BATCH_SIZE,
-          gitlab_schema: :gitlab_main_cell,
+          gitlab_schema: :gitlab_sec,
           job_arguments: [
             :project_id,
             :dast_profiles,
diff --git a/spec/migrations/20240604073805_queue_backfill_user_achievements_namespace_id_spec.rb b/spec/migrations/20240604073805_queue_backfill_user_achievements_namespace_id_spec.rb
index 9ca81217df760f764d2dad3bdfba7d22f38c559f..8b78fd911e39a5b5faa2e3e1104b78bedb334099 100644
--- a/spec/migrations/20240604073805_queue_backfill_user_achievements_namespace_id_spec.rb
+++ b/spec/migrations/20240604073805_queue_backfill_user_achievements_namespace_id_spec.rb
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillUserAchievementsNamespaceId, feature_category: :user_profile do
+RSpec.describe QueueBackfillUserAchievementsNamespaceId, migration: :gitlab_main_cell, feature_category: :user_profile do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240604074204_queue_backfill_ml_experiment_metadata_project_id_spec.rb b/spec/migrations/20240604074204_queue_backfill_ml_experiment_metadata_project_id_spec.rb
index 399cc93f3ed5f48413c4924faf1214ffdc5dc367..bff764b99b9cd7db6042f7148fb798156a64b0df 100644
--- a/spec/migrations/20240604074204_queue_backfill_ml_experiment_metadata_project_id_spec.rb
+++ b/spec/migrations/20240604074204_queue_backfill_ml_experiment_metadata_project_id_spec.rb
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillMlExperimentMetadataProjectId, feature_category: :mlops do
+RSpec.describe QueueBackfillMlExperimentMetadataProjectId, migration: :gitlab_main_cell, feature_category: :mlops do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240604145223_queue_backfill_dast_profiles_tags_project_id_spec.rb b/spec/migrations/20240604145223_queue_backfill_dast_profiles_tags_project_id_spec.rb
index 47910ac240be0284c68203651f3ffb5d9dec7b31..0e99d3844d5c8b9f3ebb17ef5622ad1b2b5cd469 100644
--- a/spec/migrations/20240604145223_queue_backfill_dast_profiles_tags_project_id_spec.rb
+++ b/spec/migrations/20240604145223_queue_backfill_dast_profiles_tags_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillDastProfilesTagsProjectId, feature_category: :dynamic_application_security_testing do
+RSpec.describe QueueBackfillDastProfilesTagsProjectId, migration: :gitlab_main_cell,
+  feature_category: :dynamic_application_security_testing do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240604150020_queue_backfill_operations_strategies_project_id_spec.rb b/spec/migrations/20240604150020_queue_backfill_operations_strategies_project_id_spec.rb
index 28058991c3f989ec5ba52870eb6b600855863d6f..d3b66d4e25a1cf30aea0de76e4df654243789f94 100644
--- a/spec/migrations/20240604150020_queue_backfill_operations_strategies_project_id_spec.rb
+++ b/spec/migrations/20240604150020_queue_backfill_operations_strategies_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillOperationsStrategiesProjectId, feature_category: :feature_flags do
+RSpec.describe QueueBackfillOperationsStrategiesProjectId, migration: :gitlab_main_cell,
+  feature_category: :feature_flags do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240604150537_queue_backfill_vulnerability_user_mentions_project_id_spec.rb b/spec/migrations/20240604150537_queue_backfill_vulnerability_user_mentions_project_id_spec.rb
index b1cb1e9f7481d325f490a812fad3a4c685fd9b1a..5d07f14c714a1bd747353c92a0b96f61aba9906d 100644
--- a/spec/migrations/20240604150537_queue_backfill_vulnerability_user_mentions_project_id_spec.rb
+++ b/spec/migrations/20240604150537_queue_backfill_vulnerability_user_mentions_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillVulnerabilityUserMentionsProjectId, feature_category: :vulnerability_management do
+RSpec.describe QueueBackfillVulnerabilityUserMentionsProjectId, migration: :gitlab_main_cell,
+  feature_category: :vulnerability_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240605090456_queue_backfill_draft_notes_project_id_spec.rb b/spec/migrations/20240605090456_queue_backfill_draft_notes_project_id_spec.rb
index e7048da37a1490f5ea4c84a1917b0cfcf40929d0..260dc2b4ff4133e68946247d483943335aef4b96 100644
--- a/spec/migrations/20240605090456_queue_backfill_draft_notes_project_id_spec.rb
+++ b/spec/migrations/20240605090456_queue_backfill_draft_notes_project_id_spec.rb
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillDraftNotesProjectId, feature_category: :code_review_workflow do
+RSpec.describe QueueBackfillDraftNotesProjectId, migration: :gitlab_main_cell, feature_category: :code_review_workflow do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240605192711_queue_backfill_dast_site_profile_secret_variables_project_id_spec.rb b/spec/migrations/20240605192711_queue_backfill_dast_site_profile_secret_variables_project_id_spec.rb
index 26c98e61e2f772186b9f9cec3a44ec544b3269ca..c30ac4560564ecf0fc9ffc5020e77d279f5517c5 100644
--- a/spec/migrations/20240605192711_queue_backfill_dast_site_profile_secret_variables_project_id_spec.rb
+++ b/spec/migrations/20240605192711_queue_backfill_dast_site_profile_secret_variables_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillDastSiteProfileSecretVariablesProjectId, feature_category: :dynamic_application_security_testing do
+RSpec.describe QueueBackfillDastSiteProfileSecretVariablesProjectId, migration: :gitlab_main_cell,
+  feature_category: :dynamic_application_security_testing do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240605193707_queue_backfill_vulnerability_state_transitions_project_id_spec.rb b/spec/migrations/20240605193707_queue_backfill_vulnerability_state_transitions_project_id_spec.rb
index 78298e5d58365e8f32203eb8733affe1f5bff8dd..5fc7d07a06fd18956f262affb6af66c37e2f724d 100644
--- a/spec/migrations/20240605193707_queue_backfill_vulnerability_state_transitions_project_id_spec.rb
+++ b/spec/migrations/20240605193707_queue_backfill_vulnerability_state_transitions_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillVulnerabilityStateTransitionsProjectId, feature_category: :vulnerability_management do
+RSpec.describe QueueBackfillVulnerabilityStateTransitionsProjectId, migration: :gitlab_main_cell,
+  feature_category: :vulnerability_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240607104717_queue_backfill_vulnerability_merge_request_links_project_id_spec.rb b/spec/migrations/20240607104717_queue_backfill_vulnerability_merge_request_links_project_id_spec.rb
index efe6c571f74850e0d9e3ad395afd07a87bd11cb8..b5fee01b017e32e6d5b8c7590340f3fb897a2084 100644
--- a/spec/migrations/20240607104717_queue_backfill_vulnerability_merge_request_links_project_id_spec.rb
+++ b/spec/migrations/20240607104717_queue_backfill_vulnerability_merge_request_links_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillVulnerabilityMergeRequestLinksProjectId, feature_category: :vulnerability_management do
+RSpec.describe QueueBackfillVulnerabilityMergeRequestLinksProjectId, migration: :gitlab_sec,
+  feature_category: :vulnerability_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240610140905_queue_backfill_packages_debian_publications_project_id_spec.rb b/spec/migrations/20240610140905_queue_backfill_packages_debian_publications_project_id_spec.rb
index 5b5fe282edf9228776c65a9600a13c437e38a4bc..5ed6ca25ccd2d744d14c2f8c1802bc1491b5fb7c 100644
--- a/spec/migrations/20240610140905_queue_backfill_packages_debian_publications_project_id_spec.rb
+++ b/spec/migrations/20240610140905_queue_backfill_packages_debian_publications_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillPackagesDebianPublicationsProjectId, feature_category: :package_registry do
+RSpec.describe QueueBackfillPackagesDebianPublicationsProjectId, migration: :gitlab_main_cell,
+  feature_category: :package_registry do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240611132547_queue_backfill_release_links_project_id_spec.rb b/spec/migrations/20240611132547_queue_backfill_release_links_project_id_spec.rb
index b6b58131e968e526934a4d1ad3915a4f22d1fe60..7434b0a0621efaa8bdcc9f48e32702d15e26b681 100644
--- a/spec/migrations/20240611132547_queue_backfill_release_links_project_id_spec.rb
+++ b/spec/migrations/20240611132547_queue_backfill_release_links_project_id_spec.rb
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillReleaseLinksProjectId, feature_category: :release_orchestration do
+RSpec.describe QueueBackfillReleaseLinksProjectId, migration: :gitlab_main_cell, feature_category: :release_orchestration do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240611142352_queue_backfill_status_check_responses_project_id_spec.rb b/spec/migrations/20240611142352_queue_backfill_status_check_responses_project_id_spec.rb
index a1cf91bf46e4e2b0815aab826e4d0c829c3a615c..8ac6150a39533e3c5b69ed7e04dd450b851941d4 100644
--- a/spec/migrations/20240611142352_queue_backfill_status_check_responses_project_id_spec.rb
+++ b/spec/migrations/20240611142352_queue_backfill_status_check_responses_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillStatusCheckResponsesProjectId, feature_category: :compliance_management do
+RSpec.describe QueueBackfillStatusCheckResponsesProjectId, migration: :gitlab_main_cell,
+  feature_category: :compliance_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240612071563_queue_backfill_epic_user_mentions_group_id_spec.rb b/spec/migrations/20240612071563_queue_backfill_epic_user_mentions_group_id_spec.rb
index f2054ef570b42fe08e9ee65f17fcdaa6b70fd59a..d799b68d57fb03a62c67e8ca8e79d819c29a9689 100644
--- a/spec/migrations/20240612071563_queue_backfill_epic_user_mentions_group_id_spec.rb
+++ b/spec/migrations/20240612071563_queue_backfill_epic_user_mentions_group_id_spec.rb
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillEpicUserMentionsGroupId, feature_category: :team_planning do
+RSpec.describe QueueBackfillEpicUserMentionsGroupId, migration: :gitlab_main_cell, feature_category: :team_planning do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240612073059_queue_backfill_operations_strategies_user_lists_project_id_spec.rb b/spec/migrations/20240612073059_queue_backfill_operations_strategies_user_lists_project_id_spec.rb
index 80b367402a853485ca6ea72d51130fad44fc8c39..2e88a21f8186c98e0916e27ca19f27edab5fe21c 100644
--- a/spec/migrations/20240612073059_queue_backfill_operations_strategies_user_lists_project_id_spec.rb
+++ b/spec/migrations/20240612073059_queue_backfill_operations_strategies_user_lists_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillOperationsStrategiesUserListsProjectId, feature_category: :feature_flags do
+RSpec.describe QueueBackfillOperationsStrategiesUserListsProjectId, migration: :gitlab_main_cell,
+  feature_category: :feature_flags do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240612074837_queue_backfill_packages_debian_project_distribution_keys_project_id_spec.rb b/spec/migrations/20240612074837_queue_backfill_packages_debian_project_distribution_keys_project_id_spec.rb
index 02129b4e60d2b6c1eefe5ef1b09ad3262f28b6ca..4015c71f8b1e271023464fdad6fc555bce6d5d6f 100644
--- a/spec/migrations/20240612074837_queue_backfill_packages_debian_project_distribution_keys_project_id_spec.rb
+++ b/spec/migrations/20240612074837_queue_backfill_packages_debian_project_distribution_keys_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillPackagesDebianProjectDistributionKeysProjectId, feature_category: :package_registry do
+RSpec.describe QueueBackfillPackagesDebianProjectDistributionKeysProjectId, migration: :gitlab_main_cell,
+  feature_category: :package_registry do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240613064362_queue_backfill_vulnerability_issue_links_project_id_spec.rb b/spec/migrations/20240613064362_queue_backfill_vulnerability_issue_links_project_id_spec.rb
index 5dea17d27834a16081a76f85d752b5c7a1005846..4c0a5757f3b36bfa4922fb4d8c254d8a14f9ddb4 100644
--- a/spec/migrations/20240613064362_queue_backfill_vulnerability_issue_links_project_id_spec.rb
+++ b/spec/migrations/20240613064362_queue_backfill_vulnerability_issue_links_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillVulnerabilityIssueLinksProjectId, feature_category: :vulnerability_management do
+RSpec.describe QueueBackfillVulnerabilityIssueLinksProjectId, migration: :gitlab_sec,
+  feature_category: :vulnerability_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240613065420_queue_backfill_related_epic_links_group_id_spec.rb b/spec/migrations/20240613065420_queue_backfill_related_epic_links_group_id_spec.rb
index 993bb1242091df41bbbb0dc4812b57ea6bd2663d..617119b969967bb57d5923b4512b7600507fb709 100644
--- a/spec/migrations/20240613065420_queue_backfill_related_epic_links_group_id_spec.rb
+++ b/spec/migrations/20240613065420_queue_backfill_related_epic_links_group_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillRelatedEpicLinksGroupId, feature_category: :portfolio_management do
+RSpec.describe QueueBackfillRelatedEpicLinksGroupId, migration: :gitlab_main_cell,
+  feature_category: :portfolio_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240613072542_queue_backfill_merge_request_context_commits_project_id_spec.rb b/spec/migrations/20240613072542_queue_backfill_merge_request_context_commits_project_id_spec.rb
index aabbfe9eb9f8776c4041240b27c274697619bb77..9450bd3af1d1207fb90b08a3753f1601fab36214 100644
--- a/spec/migrations/20240613072542_queue_backfill_merge_request_context_commits_project_id_spec.rb
+++ b/spec/migrations/20240613072542_queue_backfill_merge_request_context_commits_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillMergeRequestContextCommitsProjectId, feature_category: :code_review_workflow do
+RSpec.describe QueueBackfillMergeRequestContextCommitsProjectId, migration: :gitlab_main_cell,
+  feature_category: :code_review_workflow do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240618121521_queue_backfill_vulnerability_findings_remediations_project_id_spec.rb b/spec/migrations/20240618121521_queue_backfill_vulnerability_findings_remediations_project_id_spec.rb
index 32d3f4c859d89386b9f8f4283f10acad5597433d..8764945c81d91f52eb057aee826cf7dde1017e83 100644
--- a/spec/migrations/20240618121521_queue_backfill_vulnerability_findings_remediations_project_id_spec.rb
+++ b/spec/migrations/20240618121521_queue_backfill_vulnerability_findings_remediations_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillVulnerabilityFindingsRemediationsProjectId, feature_category: :vulnerability_management do
+RSpec.describe QueueBackfillVulnerabilityFindingsRemediationsProjectId, migration: :gitlab_main_cell,
+  feature_category: :vulnerability_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240621114937_queue_backfill_merge_request_reviewers_project_id_spec.rb b/spec/migrations/20240621114937_queue_backfill_merge_request_reviewers_project_id_spec.rb
index 50a1e4f7458ee0d2019e135432dab8b54b1c655d..2639669282e234dfa83234a484a0c58051a9ed49 100644
--- a/spec/migrations/20240621114937_queue_backfill_merge_request_reviewers_project_id_spec.rb
+++ b/spec/migrations/20240621114937_queue_backfill_merge_request_reviewers_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillMergeRequestReviewersProjectId, feature_category: :code_review_workflow do
+RSpec.describe QueueBackfillMergeRequestReviewersProjectId, migration: :gitlab_main_cell,
+  feature_category: :code_review_workflow do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240621120705_queue_backfill_packages_maven_metadata_project_id_spec.rb b/spec/migrations/20240621120705_queue_backfill_packages_maven_metadata_project_id_spec.rb
index e0516e246b52d5e69883a7a6e955119a8fa94b94..aac4eb56091e295a3360c5252580c317e19480f5 100644
--- a/spec/migrations/20240621120705_queue_backfill_packages_maven_metadata_project_id_spec.rb
+++ b/spec/migrations/20240621120705_queue_backfill_packages_maven_metadata_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillPackagesMavenMetadataProjectId, feature_category: :package_registry do
+RSpec.describe QueueBackfillPackagesMavenMetadataProjectId, migration: :gitlab_main_cell,
+  feature_category: :package_registry do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240624142014_queue_backfill_merge_requests_closing_issues_project_id_spec.rb b/spec/migrations/20240624142014_queue_backfill_merge_requests_closing_issues_project_id_spec.rb
index e84a97c01853f67f30aa1b52bd38635716e96157..9cab11924c4f2006c27b98462286be6b981c28ee 100644
--- a/spec/migrations/20240624142014_queue_backfill_merge_requests_closing_issues_project_id_spec.rb
+++ b/spec/migrations/20240624142014_queue_backfill_merge_requests_closing_issues_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillMergeRequestsClosingIssuesProjectId, feature_category: :code_review_workflow do
+RSpec.describe QueueBackfillMergeRequestsClosingIssuesProjectId, migration: :gitlab_main_cell,
+  feature_category: :code_review_workflow do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240624142361_queue_backfill_ml_model_metadata_project_id_spec.rb b/spec/migrations/20240624142361_queue_backfill_ml_model_metadata_project_id_spec.rb
index 9299edd2a1234e207d6bd950602c9514f3bb85fc..0e781e34a4b019e33db4870f19763d7ba32f7f8d 100644
--- a/spec/migrations/20240624142361_queue_backfill_ml_model_metadata_project_id_spec.rb
+++ b/spec/migrations/20240624142361_queue_backfill_ml_model_metadata_project_id_spec.rb
@@ -3,7 +3,7 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillMlModelMetadataProjectId, feature_category: :mlops do
+RSpec.describe QueueBackfillMlModelMetadataProjectId, migration: :gitlab_main_cell, feature_category: :mlops do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240626141557_queue_backfill_packages_dependency_links_project_id_spec.rb b/spec/migrations/20240626141557_queue_backfill_packages_dependency_links_project_id_spec.rb
index c754219be99a04e50e59cb4a835b35aea517828d..159e11a95db2d8c9b8224247de9f4b80d36666ed 100644
--- a/spec/migrations/20240626141557_queue_backfill_packages_dependency_links_project_id_spec.rb
+++ b/spec/migrations/20240626141557_queue_backfill_packages_dependency_links_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillPackagesDependencyLinksProjectId, feature_category: :package_registry do
+RSpec.describe QueueBackfillPackagesDependencyLinksProjectId, migration: :gitlab_main_cell,
+  feature_category: :package_registry do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240627133840_queue_backfill_packages_debian_project_components_project_id_spec.rb b/spec/migrations/20240627133840_queue_backfill_packages_debian_project_components_project_id_spec.rb
index 2bd7a5aa0eee4760ba21f614047168044ea620d4..181b42cb4f334c5f5b82b78cf6c504b1615d6e87 100644
--- a/spec/migrations/20240627133840_queue_backfill_packages_debian_project_components_project_id_spec.rb
+++ b/spec/migrations/20240627133840_queue_backfill_packages_debian_project_components_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillPackagesDebianProjectComponentsProjectId, feature_category: :package_registry do
+RSpec.describe QueueBackfillPackagesDebianProjectComponentsProjectId, migration: :gitlab_main_cell,
+  feature_category: :package_registry do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240701074852_queue_backfill_packages_debian_group_components_group_id_spec.rb b/spec/migrations/20240701074852_queue_backfill_packages_debian_group_components_group_id_spec.rb
index d7bf5e85e36e7295aecf8368a9abb25ae11ae47a..4a58be315bb1321fb34409b59e4dd760fa0c060a 100644
--- a/spec/migrations/20240701074852_queue_backfill_packages_debian_group_components_group_id_spec.rb
+++ b/spec/migrations/20240701074852_queue_backfill_packages_debian_group_components_group_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillPackagesDebianGroupComponentsGroupId, feature_category: :package_registry do
+RSpec.describe QueueBackfillPackagesDebianGroupComponentsGroupId, migration: :gitlab_main_cell,
+  feature_category: :package_registry do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240702072519_queue_backfill_packages_debian_group_architectures_group_id_spec.rb b/spec/migrations/20240702072519_queue_backfill_packages_debian_group_architectures_group_id_spec.rb
index cad68bbfb21b86dd97d617fd616205940f56e607..039e4b858bc4f05b0de582f00b90427b88a689d7 100644
--- a/spec/migrations/20240702072519_queue_backfill_packages_debian_group_architectures_group_id_spec.rb
+++ b/spec/migrations/20240702072519_queue_backfill_packages_debian_group_architectures_group_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillPackagesDebianGroupArchitecturesGroupId, feature_category: :package_registry do
+RSpec.describe QueueBackfillPackagesDebianGroupArchitecturesGroupId, migration: :gitlab_main_cell,
+  feature_category: :package_registry do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240711035245_queue_backfill_root_namespace_cluster_agent_mappings_again_spec.rb b/spec/migrations/20240711035245_queue_backfill_root_namespace_cluster_agent_mappings_again_spec.rb
index 3543711c5afcc8ecc11492ee7b30c6422420850d..493245824250c193d2f39e20c5c88f8aaaf4ec4a 100644
--- a/spec/migrations/20240711035245_queue_backfill_root_namespace_cluster_agent_mappings_again_spec.rb
+++ b/spec/migrations/20240711035245_queue_backfill_root_namespace_cluster_agent_mappings_again_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillRootNamespaceClusterAgentMappingsAgain, feature_category: :workspaces do
+RSpec.describe QueueBackfillRootNamespaceClusterAgentMappingsAgain, migration: :gitlab_main_cell,
+  feature_category: :workspaces do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240716133952_queue_backfill_evidences_project_id_spec.rb b/spec/migrations/20240716133952_queue_backfill_evidences_project_id_spec.rb
index 8b919e5474a6904537dca28f93145d5752e2caf4..8115f11f37fd88e7e280ada902076e8850aa3de6 100644
--- a/spec/migrations/20240716133952_queue_backfill_evidences_project_id_spec.rb
+++ b/spec/migrations/20240716133952_queue_backfill_evidences_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillEvidencesProjectId, feature_category: :release_evidence do
+RSpec.describe QueueBackfillEvidencesProjectId, migration: :gitlab_main_cell,
+  feature_category: :release_evidence do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240716135356_queue_backfill_approval_group_rules_users_group_id_spec.rb b/spec/migrations/20240716135356_queue_backfill_approval_group_rules_users_group_id_spec.rb
index 938b3ca29a5e4f54e456c3ed04b82e61cfb8efd7..90fba005da95f59a5e3275d9b464a7a4420b3fba 100644
--- a/spec/migrations/20240716135356_queue_backfill_approval_group_rules_users_group_id_spec.rb
+++ b/spec/migrations/20240716135356_queue_backfill_approval_group_rules_users_group_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillApprovalGroupRulesUsersGroupId, feature_category: :source_code_management do
+RSpec.describe QueueBackfillApprovalGroupRulesUsersGroupId, migration: :gitlab_main_cell,
+  feature_category: :source_code_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240719090631_queue_backfill_approvals_project_id_spec.rb b/spec/migrations/20240719090631_queue_backfill_approvals_project_id_spec.rb
index 41a369b5dd325f44d79915b74412898431f98ef7..3467dcdba9c1d81da16d8a0387ac3c548bbeed70 100644
--- a/spec/migrations/20240719090631_queue_backfill_approvals_project_id_spec.rb
+++ b/spec/migrations/20240719090631_queue_backfill_approvals_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillApprovalsProjectId, feature_category: :code_review_workflow do
+RSpec.describe QueueBackfillApprovalsProjectId, migration: :gitlab_main_cell,
+  feature_category: :code_review_workflow do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240722095920_queue_backfill_compliance_framework_security_policies_namespace_id_spec.rb b/spec/migrations/20240722095920_queue_backfill_compliance_framework_security_policies_namespace_id_spec.rb
index d640116f42f2b9f8c81a4bf7f41a9faaa6b2c731..d032229cbc2505c9959871bf360e80fc969b9840 100644
--- a/spec/migrations/20240722095920_queue_backfill_compliance_framework_security_policies_namespace_id_spec.rb
+++ b/spec/migrations/20240722095920_queue_backfill_compliance_framework_security_policies_namespace_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillComplianceFrameworkSecurityPoliciesNamespaceId, feature_category: :security_policy_management do
+RSpec.describe QueueBackfillComplianceFrameworkSecurityPoliciesNamespaceId, migration: :gitlab_main_cell,
+  feature_category: :security_policy_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240725171401_queue_backfill_merge_request_user_mentions_project_id_spec.rb b/spec/migrations/20240725171401_queue_backfill_merge_request_user_mentions_project_id_spec.rb
index 4f31dcd8d4f131b856f5bd79502f823de2068411..13cbff93b15b1cf9fc12e1b414dfdef258ff30a2 100644
--- a/spec/migrations/20240725171401_queue_backfill_merge_request_user_mentions_project_id_spec.rb
+++ b/spec/migrations/20240725171401_queue_backfill_merge_request_user_mentions_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillMergeRequestUserMentionsProjectId, feature_category: :code_review_workflow do
+RSpec.describe QueueBackfillMergeRequestUserMentionsProjectId, migration: :gitlab_main_cell,
+  feature_category: :code_review_workflow do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240731160144_queue_backfill_error_tracking_error_events_project_id_spec.rb b/spec/migrations/20240731160144_queue_backfill_error_tracking_error_events_project_id_spec.rb
index 4c8d1c0fc68804ad366b927b19d3f58d8f2aa300..03f20e24781f95c3cfcd0604b529022f9ce5f134 100644
--- a/spec/migrations/20240731160144_queue_backfill_error_tracking_error_events_project_id_spec.rb
+++ b/spec/migrations/20240731160144_queue_backfill_error_tracking_error_events_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillErrorTrackingErrorEventsProjectId, feature_category: :observability do
+RSpec.describe QueueBackfillErrorTrackingErrorEventsProjectId, migration: :gitlab_main_cell,
+  feature_category: :observability do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240815083838_queue_backfill_protected_env_deploy_access_levels_protected_env_project_id_spec.rb b/spec/migrations/20240815083838_queue_backfill_protected_env_deploy_access_levels_protected_env_project_id_spec.rb
index e295136fdca1ec9e8299a10f29148b0c77e13a77..9862e4530462bb6d3f4a7c541281b380d6422b14 100644
--- a/spec/migrations/20240815083838_queue_backfill_protected_env_deploy_access_levels_protected_env_project_id_spec.rb
+++ b/spec/migrations/20240815083838_queue_backfill_protected_env_deploy_access_levels_protected_env_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillProtectedEnvDeployAccessLevelsProtectedEnvProjectId, feature_category: :continuous_delivery do
+RSpec.describe QueueBackfillProtectedEnvDeployAccessLevelsProtectedEnvProjectId, migration: :gitlab_main_cell,
+  feature_category: :continuous_delivery do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240815083843_queue_backfill_protected_env_deploy_access_levels_protected_env_group_id_spec.rb b/spec/migrations/20240815083843_queue_backfill_protected_env_deploy_access_levels_protected_env_group_id_spec.rb
index 2403a458c3a2dac588c5b31a27dea740f13cee1f..e53ec0dcbb8e4648f137d4197c03f81fa0216116 100644
--- a/spec/migrations/20240815083843_queue_backfill_protected_env_deploy_access_levels_protected_env_group_id_spec.rb
+++ b/spec/migrations/20240815083843_queue_backfill_protected_env_deploy_access_levels_protected_env_group_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillProtectedEnvDeployAccessLevelsProtectedEnvGroupId, feature_category: :continuous_delivery do
+RSpec.describe QueueBackfillProtectedEnvDeployAccessLevelsProtectedEnvGroupId, migration: :gitlab_main_cell,
+  feature_category: :continuous_delivery do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240816130544_queue_backfill_security_orchestration_policy_rule_schedules_namespace_id_spec.rb b/spec/migrations/20240816130544_queue_backfill_security_orchestration_policy_rule_schedules_namespace_id_spec.rb
index 76f43118fecf127b365e77343f6b6897962d796e..8edf5d874b99193ec020c420adf0fdabbe5ea734 100644
--- a/spec/migrations/20240816130544_queue_backfill_security_orchestration_policy_rule_schedules_namespace_id_spec.rb
+++ b/spec/migrations/20240816130544_queue_backfill_security_orchestration_policy_rule_schedules_namespace_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillSecurityOrchestrationPolicyRuleSchedulesNamespaceId, feature_category: :security_policy_management do
+RSpec.describe QueueBackfillSecurityOrchestrationPolicyRuleSchedulesNamespaceId, migration: :gitlab_main_cell,
+  feature_category: :security_policy_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/migrations/20240916124325_queue_backfill_alert_management_alert_user_mentions_project_id_spec.rb b/spec/migrations/20240916124325_queue_backfill_alert_management_alert_user_mentions_project_id_spec.rb
index 4e32c4046a486db64ca40ffb569b907ebaf49b8a..fcc77a3bab1c037209905691cc28d1467469021b 100644
--- a/spec/migrations/20240916124325_queue_backfill_alert_management_alert_user_mentions_project_id_spec.rb
+++ b/spec/migrations/20240916124325_queue_backfill_alert_management_alert_user_mentions_project_id_spec.rb
@@ -3,7 +3,8 @@
 require 'spec_helper'
 require_migration!
 
-RSpec.describe QueueBackfillAlertManagementAlertUserMentionsProjectId, feature_category: :incident_management do
+RSpec.describe QueueBackfillAlertManagementAlertUserMentionsProjectId, migration: :gitlab_main_cell,
+  feature_category: :incident_management do
   let!(:batched_migration) { described_class::MIGRATION }
 
   it 'schedules a new batched migration' do
diff --git a/spec/support/matchers/background_migrations_matchers.rb b/spec/support/matchers/background_migrations_matchers.rb
index 328506b4bd55557cfcaf4ed18093c0f435b9b8a5..35e03c27c731b9d4d11ead7794124f886590eacd 100644
--- a/spec/support/matchers/background_migrations_matchers.rb
+++ b/spec/support/matchers/background_migrations_matchers.rb
@@ -65,10 +65,19 @@ def same_arrays?(arg, expected)
   end
 end
 
-RSpec::Matchers.define :have_scheduled_batched_migration do |gitlab_schema: :gitlab_main, table_name: nil, column_name: nil, job_arguments: [], **attributes|
+RSpec::Matchers.define :have_scheduled_batched_migration do |gitlab_schema: nil, table_name: nil, column_name: nil, job_arguments: [], **attributes|
   define_method :matches? do |migration|
     reset_column_information(Gitlab::Database::BackgroundMigration::BatchedMigration)
 
+    if gitlab_schema.nil?
+      expect(described_class.allowed_gitlab_schemas.count).to(
+        be(1),
+        "Please specify a gitlab_schema, since more than one schema is allowed for #{described_class}: " \
+          "#{described_class.allowed_gitlab_schemas}"
+      )
+      gitlab_schema = described_class.allowed_gitlab_schemas.first
+    end
+
     batched_migrations =
       Gitlab::Database::BackgroundMigration::BatchedMigration
         .for_configuration(gitlab_schema, migration, table_name, column_name, job_arguments)