2018-03-17 18:26:18 +05:30
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2017-09-10 17:25:29 +05:30
|
|
|
# rubocop:disable Migration/UpdateColumnInBatches
|
2016-06-22 15:30:34 +05:30
|
|
|
class SetMissingStageOnCiBuilds < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2016-06-22 15:30:34 +05:30
|
|
|
def up
|
|
|
|
update_column_in_batches(:ci_builds, :stage, :test) do |table, query|
|
|
|
|
query.where(table[:stage].eq(nil))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|