diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-05-02 07:50:52 +0000 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-05-15 14:47:24 +0800 |
commit | 45f66c8021704276cb5ddf8831606ced71e955e9 (patch) | |
tree | d6da313f62fba6231b555d1c8c8aad74bbd0070b /db | |
parent | 133d2bb40a6c8516a8c8c487f347fa99bd7e907c (diff) | |
download | gitlab-ce-45f66c8021704276cb5ddf8831606ced71e955e9.tar.gz |
Make auto-cancelling pending pipelines on by default
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb | 13 | ||||
-rw-r--r-- | db/migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb | 14 | ||||
-rw-r--r-- | db/schema.rb | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb b/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb new file mode 100644 index 00000000000..03bf626a08a --- /dev/null +++ b/db/migrate/20170502065653_make_auto_cancel_pending_pipelines_on_by_default.rb @@ -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 diff --git a/db/migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb b/db/migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb new file mode 100644 index 00000000000..bc43cd34c4d --- /dev/null +++ b/db/migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb @@ -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 diff --git a/db/schema.rb b/db/schema.rb index 65eaccf766a..e164347a054 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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" |