summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-09-01 11:23:15 -0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-09-01 11:23:15 -0300
commit9a5c9b46922aeb91e5027b0511e6526c8dd34827 (patch)
tree669a575b7c38a50fa9d78f477a9fb58a4dd0a333 /db/migrate
parent443573ad936f792737fbd5f1902aa4fb87134231 (diff)
downloadgitlab-ce-9a5c9b46922aeb91e5027b0511e6526c8dd34827.tar.gz
Add migration to set confidential issues events on web hooks
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb b/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb
new file mode 100644
index 00000000000..f1a1f001cb3
--- /dev/null
+++ b/db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb
@@ -0,0 +1,15 @@
+class SetConfidentialIssuesEventsOnWebhooks < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ 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