Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20160615191922_set_missing_stage_on_ci_builds.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c58cb957df4058f1079ee36be4a6a81735228cfe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
class SetMissingStageOnCiBuilds < ActiveRecord::Migration
  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