Move to post_migrate and use update_column_in_batches

This commit is contained in:
Lin Jen-Shin 2017-05-15 14:27:30 +08:00
parent dbd034b7a2
commit b5bffbd4ad
1 changed files with 1 additions and 2 deletions

View File

@ -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