Commit 4a0117b8 authored by Sean McGivern's avatar Sean McGivern Committed by Douglas Barbosa Alexandre

Merge branch 'issue_25889' into 'master'

Revert MattermostNotificationService and SlackNotificationService to MattermostS…

Closes #25889

See merge request !8240
parent 0c4b3472
class RenameSlackAndMattermostNotificationServices < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
update_column_in_batches(:services, :type, 'SlackService') do |table, query|
query.where(table[:type].eq('SlackNotificationService'))
end
update_column_in_batches(:services, :type, 'MattermostService') do |table, query|
query.where(table[:type].eq('MattermostNotificationService'))
end
end
def down
update_column_in_batches(:services, :type, 'SlackNotificationService') do |table, query|
query.where(table[:type].eq('SlackService'))
end
update_column_in_batches(:services, :type, 'MattermostNotificationService') do |table, query|
query.where(table[:type].eq('MattermostService'))
end
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20161221140236) do
ActiveRecord::Schema.define(version: 20161227192806) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -1293,4 +1293,4 @@ ActiveRecord::Schema.define(version: 20161221140236) do
add_foreign_key "subscriptions", "projects", on_delete: :cascade
add_foreign_key "trending_projects", "projects", on_delete: :cascade
add_foreign_key "u2f_registrations", "users"
end
\ No newline at end of file
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment