Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20160901141443_set_confidential_issues_events_on_webhooks.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f8486e3e1a6140929a8abc74ed2a3da29acd3112 (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
  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