summaryrefslogtreecommitdiff
path: root/db
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
parentdbd034b7a20c5b8f25df253d9be82c986346dc5a (diff)
downloadgitlab-ce-b5bffbd4adc5005b8c9f7d82d68a01743fbf2f28.tar.gz
Move to post_migrate and use update_column_in_batches
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb (renamed from db/migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb)3
1 files changed, 1 insertions, 2 deletions
diff --git a/db/migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb b/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
index bc43cd34c4d..0abc75a3ed6 100644
--- a/db/migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
+++ b/db/post_migrate/20170502070007_enable_auto_cancel_pending_pipelines_for_all.rb
@@ -4,8 +4,7 @@ class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration
DOWNTIME = false
def up
- connection.execute(
- 'UPDATE projects SET auto_cancel_pending_pipelines = 1')
+ update_column_in_batches(:projects, :auto_cancel_pending_pipelines, 1)
end
def down