summaryrefslogtreecommitdiff
path: root/db/post_migrate
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-05-15 14:27:30 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-05-15 14:48:24 +0800
commitb5bffbd4adc5005b8c9f7d82d68a01743fbf2f28 (patch)
tree409786636f3be559905d158fbace4f2b35f91eea /db/post_migrate
parentdbd034b7a20c5b8f25df253d9be82c986346dc5a (diff)
downloadgitlab-ce-b5bffbd4adc5005b8c9f7d82d68a01743fbf2f28.tar.gz
Move to post_migrate and use update_column_in_batches
Diffstat (limited to 'db/post_migrate')
-rw-r--r--db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb b/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
new file mode 100644
index 00000000000..0abc75a3ed6
--- /dev/null
+++ b/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
@@ -0,0 +1,13 @@
+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