2017-11-17 13:38:14 +00:00
|
|
|
# rubocop:disable Migration/UpdateLargeTable
|
2017-05-23 12:57:03 +00:00
|
|
|
# rubocop:disable Migration/UpdateColumnInBatches
|
2018-11-13 07:27:31 +00:00
|
|
|
class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration[4.2]
|
2017-05-02 07:50:52 +00:00
|
|
|
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-08-10 23:45:46 +00:00
|
|
|
disable_statement_timeout do
|
2018-07-09 21:31:45 +00:00
|
|
|
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
|