Commit 93d217bd authored by Grzegorz Bizon's avatar Grzegorz Bizon

Migrate only old stages without status that is set

parent b3ee172b
...@@ -72,7 +72,9 @@ class MigrateStagesStatuses < ActiveRecord::Migration ...@@ -72,7 +72,9 @@ class MigrateStagesStatuses < ActiveRecord::Migration
.where('ci_builds.stage = ci_stages.name') .where('ci_builds.stage = ci_stages.name')
.status_sql .status_sql
update_column_in_batches(:ci_stages, :status, Arel.sql("(#{status_sql})")) update_column_in_batches(:ci_stages, :status, Arel.sql("(#{status_sql})")) do |table, query|
query.where(table[:status].eq(nil))
end
end end
def down def down
......
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