Make stages index background migration more idempotent
This commit is contained in:
parent
02999234d4
commit
181d8f687d
1 changed files with 1 additions and 0 deletions
|
@ -18,6 +18,7 @@ module Gitlab
|
|||
WHERE ci_builds.stage_id = ci_stages.id
|
||||
GROUP BY ci_builds.stage_idx ORDER BY COUNT(*) DESC LIMIT 1)
|
||||
WHERE ci_stages.id BETWEEN #{start_id.to_i} AND #{stop_id.to_i}
|
||||
AND ci_stages.index IS NULL
|
||||
SQL
|
||||
|
||||
ActiveRecord::Base.connection.execute(sql)
|
||||
|
|
Loading…
Reference in a new issue