class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

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

  def down
    # Nothing we can do!
  end
end

class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  disable_ddl_transaction!

  DOWNTIME = false

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

  def down
    # Nothing we can do!
  end
end

Disable transaction for updating the table
Disable transaction for updating the table
