summaryrefslogtreecommitdiff
path: root/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
blob: 4d091d7f2757f458ddeae776bbbf41b7d94b967b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration[4.2]
  include Gitlab::Database::MigrationHelpers

  disable_ddl_transaction!

  DOWNTIME = false

  def up
    disable_statement_timeout do
      update_column_in_batches(:projects, :auto_cancel_pending_pipelines, 1)
    end
  end

  def down
    # Nothing we can do!
  end
end