diff --git a/doc/development/database/batched_background_migrations.md b/doc/development/database/batched_background_migrations.md index 2566f86b8f3ba815d947f65ffeebf53bb3611cbd..7cb708e0cbba1376b442ac3d2a0400e8b3a606df 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`, 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: ```shell bundle exec rails g batched_background_migration my_batched_migration --table_name=<table-name> --column_name=<column-name> --feature_category=<feature-category>