debian-mirror-gitlab/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
2018-11-20 20:47:30 +05:30

20 lines
440 B
Ruby

# rubocop:disable Migration/UpdateLargeTable
# rubocop:disable Migration/UpdateColumnInBatches
class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration
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