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

View file

@ -4,8 +4,7 @@ class EnableAutoCancelPendingPipelinesForAll < ActiveRecord::Migration
DOWNTIME = false DOWNTIME = false
def up def up
connection.execute( update_column_in_batches(:projects, :auto_cancel_pending_pipelines, 1)
'UPDATE projects SET auto_cancel_pending_pipelines = 1')
end end
def down def down