提交 b72abd1d 编写于 作者: G Grzegorz Bizon

Migrate stage_id only it job does not have it already

上级 af72fa9c
......@@ -10,7 +10,9 @@ class MigrateBuildStageReference < ActiveRecord::Migration
'WHERE ci_stages.pipeline_id = ci_builds.commit_id ' \
'AND ci_stages.name = ci_builds.stage)')
update_column_in_batches(:ci_builds, :stage_id, stage_id)
update_column_in_batches(:ci_builds, :stage_id, stage_id) do |table, query|
query.where(table[:stage_id].eq(nil))
end
end
def down
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册