summaryrefslogtreecommitdiff
path: root/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb
blob: 2921bb566c9ac637038bc766ee7c08af793746a1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# rubocop:disable Migration/UpdateColumnInBatches
class SetConfidentialIssuesEventsOnWebhooks < ActiveRecord::Migration[4.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  disable_ddl_transaction!

  def up
    update_column_in_batches(:web_hooks, :confidential_issues_events, true) do |table, query|
      query.where(table[:issues_events].eq(true))
    end
  end

  def down
    # noop
  end
end