summaryrefslogtreecommitdiff
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
parent443573ad936f792737fbd5f1902aa4fb87134231 (diff)
downloadgitlab-ce-9a5c9b46922aeb91e5027b0511e6526c8dd34827.tar.gz
Add migration to set confidential issues events on web hooks
-rw-r--r--db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb15
-rw-r--r--db/schema.rb2
2 files changed, 16 insertions, 1 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
diff --git a/db/schema.rb b/db/schema.rb
index c9560abeb92..f5abdbfeb9c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20160830232601) do
+ActiveRecord::Schema.define(version: 20160901141443) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"