Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-21 00:14:33 +0300
committerDouglas Barbosa Alexandre <dbalexandre@gmail.com>2016-12-21 00:42:13 +0300
commitfed29117de6f30055d88daaa497ec18f85397ad6 (patch)
tree819ca4ddedde57b28acabf6b5993391bd6375b7c /db
parent1139da2745eb28be17c8fd6aa0f5de113c0f06a9 (diff)
Rename SlackNotificationService back to SlackService
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20141006143943_move_slack_service_to_webhook.rb2
-rw-r--r--db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb13
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