diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-05-15 14:27:30 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-05-15 14:48:24 +0800 |
commit | b5bffbd4adc5005b8c9f7d82d68a01743fbf2f28 (patch) | |
tree | 409786636f3be559905d158fbace4f2b35f91eea /db/post_migrate | |
parent | dbd034b7a20c5b8f25df253d9be82c986346dc5a (diff) | |
download | gitlab-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.rb | 13 |
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 |