diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2016-12-20 23:12:25 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-20 21:26:13 -0200 |
commit | 0499bdc16c1e122e891ca454ab6176c7e72b6557 (patch) | |
tree | 5414bc955f5e4ed31e5fccd03b9f863d7b8eb8db /db | |
parent | 431b9d1b6aca48c3b299e10aff6f0b2a60649549 (diff) | |
download | gitlab-ce-0499bdc16c1e122e891ca454ab6176c7e72b6557.tar.gz |
Merge branch 'fix/25843' into 'master'
Rename SlackNotificationService back to SlackService
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8191#note_20310845
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/25843
/cc @yorickpeterse @stanhu @smcgivern @felipe_artur @ayufan
See merge request !8208
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20141006143943_move_slack_service_to_webhook.rb | 2 | ||||
-rw-r--r-- | db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb | 13 |
2 files changed, 6 insertions, 9 deletions
diff --git a/db/migrate/20141006143943_move_slack_service_to_webhook.rb b/db/migrate/20141006143943_move_slack_service_to_webhook.rb index 42e88d6d6e3..561184615cc 100644 --- a/db/migrate/20141006143943_move_slack_service_to_webhook.rb +++ b/db/migrate/20141006143943_move_slack_service_to_webhook.rb @@ -5,7 +5,7 @@ class MoveSlackServiceToWebhook < ActiveRecord::Migration DOWNTIME_REASON = 'Move old fields "token" and "subdomain" to one single field "webhook"' def change - SlackNotificationService.all.each do |slack_service| + SlackService.all.each do |slack_service| if ["token", "subdomain"].all? { |property| slack_service.properties.key? property } token = slack_service.properties['token'] subdomain = slack_service.properties['subdomain'] diff --git a/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb b/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb index a7278d7b5a6..dc38d0ac906 100644 --- a/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb +++ b/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb @@ -1,14 +1,11 @@ class ChangeSlackServiceToSlackNotificationService < ActiveRecord::Migration include Gitlab::Database::MigrationHelpers - DOWNTIME = true - DOWNTIME_REASON = 'Rename SlackService to SlackNotificationService' + DOWNTIME = false - def up - execute("UPDATE services SET type = 'SlackNotificationService' WHERE type = 'SlackService'") - end - - def down - execute("UPDATE services SET type = 'SlackService' WHERE type = 'SlackNotificationService'") + # This migration is a no-op, as it existed in an RC but we renamed + # SlackNotificationService back to SlackService: + # https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8191#note_20310845 + def change end end |