2017-11-17 13:38:14 +00:00
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2017-05-23 12:57:03 +00:00
|
|
|
# rubocop:disable Migration/UpdateColumnInBatches
|
2017-05-02 07:50:52 +00:00
|
|
|
class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
2017-05-15 08:22:29 +00:00
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2017-05-02 07:50:52 +00:00
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def up
|
2018-07-09 21:31:45 +00:00
|
|
|
disable_statement_timeout(transaction: false) do
|
|
|
|
update_column_in_batches(:projects, :auto_cancel_pending_pipelines, 1)
|
|
|
|
end
|
2017-05-02 07:50:52 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
# Nothing we can do!
|
|
|
|
end
|
|
|
|
end
|