Commit 1985328c authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'optimistic_locking_null_patch' into 'master'

Ensure CleanupOptimisticLockingNulls uses BETWEEN

See merge request gitlab-org/gitlab!26343
parents 36029973 4606deb6
......@@ -17,7 +17,7 @@ module Gitlab
(start_id..stop_id).each_slice(QUERY_ITEM_SIZE).each do |range|
model
.where(lock_version: nil)
.where(id: range)
.where("ID BETWEEN ? AND ?", range.first, range.last)
.update_all(lock_version: 0)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment