From 5117abe993b0fa0112462b7f6f5f2f873ca67ba9 Mon Sep 17 00:00:00 2001
From: Carla Drago <cdrago@gitlab.com>
Date: Thu, 1 Aug 2024 08:43:24 +0000
Subject: [PATCH 1/3] Update batched background migrations docs

---
 doc/development/database/batched_background_migrations.md | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/development/database/batched_background_migrations.md b/doc/development/database/batched_background_migrations.md
index 2566f86b8f3ba815..639c481e531e1ff9 100644
--- a/doc/development/database/batched_background_migrations.md
+++ b/doc/development/database/batched_background_migrations.md
@@ -220,7 +220,12 @@ data fully migrated. ([See an example](https://gitlab.com/gitlab-org/gitlab/-/bl
 ### Generate a batched background migration
 
 The custom generator `batched_background_migration` scaffolds necessary files and
-accepts `table_name`, `column_name`, and `feature_category` as arguments. Usage:
+accepts `table_name`, `column_name`, and `feature_category` as arguments.  When 
+choosing the `column_name` make sure to use a column type that can be iterated over, 
+e.g. the table's primary key. (See [Batch over non-distinct columns](#batch-over-non-distinct-columns)
+for more information)
+
+Usage:
 
 ```shell
 bundle exec rails g batched_background_migration my_batched_migration --table_name=<table-name> --column_name=<column-name> --feature_category=<feature-category>
-- 
GitLab


From 4618994cab8022ac507fabcd5f6cbd5f22537bc5 Mon Sep 17 00:00:00 2001
From: Carla Drago <cdrago@gitlab.com>
Date: Thu, 1 Aug 2024 09:41:46 +0000
Subject: [PATCH 2/3] Fix linting error

---
 doc/development/database/batched_background_migrations.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/development/database/batched_background_migrations.md b/doc/development/database/batched_background_migrations.md
index 639c481e531e1ff9..12cab41165ab77d9 100644
--- a/doc/development/database/batched_background_migrations.md
+++ b/doc/development/database/batched_background_migrations.md
@@ -220,7 +220,7 @@ data fully migrated. ([See an example](https://gitlab.com/gitlab-org/gitlab/-/bl
 ### Generate a batched background migration
 
 The custom generator `batched_background_migration` scaffolds necessary files and
-accepts `table_name`, `column_name`, and `feature_category` as arguments.  When 
+accepts `table_name`, `column_name`, and `feature_category` as arguments. When 
 choosing the `column_name` make sure to use a column type that can be iterated over, 
 e.g. the table's primary key. (See [Batch over non-distinct columns](#batch-over-non-distinct-columns)
 for more information)
-- 
GitLab


From 165003ba10d02a74536eaf818083375b2de42ae6 Mon Sep 17 00:00:00 2001
From: Carla Drago <cdrago@gitlab.com>
Date: Fri, 2 Aug 2024 08:20:12 +0000
Subject: [PATCH 3/3] Add suggestion

---
 doc/development/database/batched_background_migrations.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/doc/development/database/batched_background_migrations.md b/doc/development/database/batched_background_migrations.md
index 12cab41165ab77d9..7cb708e0cbba1376 100644
--- a/doc/development/database/batched_background_migrations.md
+++ b/doc/development/database/batched_background_migrations.md
@@ -220,10 +220,10 @@ data fully migrated. ([See an example](https://gitlab.com/gitlab-org/gitlab/-/bl
 ### Generate a batched background migration
 
 The custom generator `batched_background_migration` scaffolds necessary files and
-accepts `table_name`, `column_name`, and `feature_category` as arguments. When 
-choosing the `column_name` make sure to use a column type that can be iterated over, 
-e.g. the table's primary key. (See [Batch over non-distinct columns](#batch-over-non-distinct-columns)
-for more information)
+accepts `table_name`, `column_name`, and `feature_category` as arguments. When
+choosing the `column_name`, ensure that you are using a column type that can be iterated over distinctly,
+preferably the table's primary key. The table will be iterated over based on the column defined here.
+For more information, see [Batch over non-distinct columns](#batch-over-non-distinct-columns).
 
 Usage:
 
-- 
GitLab