diff options
Diffstat (limited to 'lib/gitlab/background_migration/populate_user_highest_roles_table.rb')
-rw-r--r-- | lib/gitlab/background_migration/populate_user_highest_roles_table.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/gitlab/background_migration/populate_user_highest_roles_table.rb b/lib/gitlab/background_migration/populate_user_highest_roles_table.rb index 0c9e15b5a80..16386ebf9c3 100644 --- a/lib/gitlab/background_migration/populate_user_highest_roles_table.rb +++ b/lib/gitlab/background_migration/populate_user_highest_roles_table.rb @@ -20,6 +20,8 @@ module Gitlab end def perform(from_id, to_id) + return unless User.column_names.include?('bot_type') + (from_id..to_id).each_slice(BATCH_SIZE) do |ids| execute( <<-EOF |