summaryrefslogtreecommitdiff
path: root/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb')
-rw-r--r--db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb14
1 files changed, 14 insertions, 0 deletions
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
new file mode 100644
index 00000000000..a7278d7b5a6
--- /dev/null
+++ b/db/migrate/20161213172958_change_slack_service_to_slack_notification_service.rb
@@ -0,0 +1,14 @@
+class ChangeSlackServiceToSlackNotificationService < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = true
+ DOWNTIME_REASON = 'Rename SlackService to SlackNotificationService'
+
+ def up
+ execute("UPDATE services SET type = 'SlackNotificationService' WHERE type = 'SlackService'")
+ end
+
+ def down
+ execute("UPDATE services SET type = 'SlackService' WHERE type = 'SlackNotificationService'")
+ end
+end