debian-mirror-gitlab/db/migrate/20160615191922_set_missing_stage_on_ci_builds.rb
2019-02-15 15:39:39 +05:30

14 lines
374 B
Ruby

# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
class SetMissingStageOnCiBuilds < ActiveRecord::Migration[4.2]
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
def up
update_column_in_batches(:ci_builds, :stage, :test) do |table, query|
query.where(table[:stage].eq(nil))
end
end
end