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

20161213172958_change_slack_service_to_slack_notification_service.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a7278d7b5a629e06bdaf474c550de806678aaa89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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