Make auto-cancelling pending pipelines on by default

This commit is contained in:
Lin Jen-Shin 2017-05-02 07:50:52 +00:00
parent 133d2bb40a
commit 45f66c8021
4 changed files with 32 additions and 1 deletions

View file

@ -0,0 +1,4 @@
---
title: Enable cancelling non-HEAD pending pipelines by default for all projects
merge_request: 11023
author:

View file

@ -0,0 +1,13 @@
class MakeAutoCancelPendingPipelinesOnByDefault < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
change_column_default(:projects, :auto_cancel_pending_pipelines, 1)
end
def down
change_column_default(:projects, :auto_cancel_pending_pipelines, 0)
end
end

View file

@ -0,0 +1,14 @@
class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
connection.execute(
'UPDATE projects SET auto_cancel_pending_pipelines = 1')
end
def down
# Nothing we can do!
end
end

View file

@ -986,7 +986,7 @@ ActiveRecord::Schema.define(version: 20170508190732) do
t.text "description_html"
t.boolean "only_allow_merge_if_all_discussions_are_resolved"
t.boolean "printing_merge_request_link_enabled", default: true, null: false
t.integer "auto_cancel_pending_pipelines", default: 0, null: false
t.integer "auto_cancel_pending_pipelines", default: 1, null: false
t.string "import_jid"
t.integer "cached_markdown_version"
t.datetime "last_repository_updated_at"