diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-01 11:23:15 -0300 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-09-01 11:23:15 -0300 |
commit | 9a5c9b46922aeb91e5027b0511e6526c8dd34827 (patch) | |
tree | 669a575b7c38a50fa9d78f477a9fb58a4dd0a333 /db | |
parent | 443573ad936f792737fbd5f1902aa4fb87134231 (diff) | |
download | gitlab-ce-9a5c9b46922aeb91e5027b0511e6526c8dd34827.tar.gz |
Add migration to set confidential issues events on web hooks
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20160901141443_set_confidential_issues_events_on_webhooks.rb | 15 | ||||
-rw-r--r-- | db/schema.rb | 2 |
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" |