summaryrefslogtreecommitdiff
path: root/db/post_migrate/20171123101046_remove_old_circuitbreaker_config.rb
blob: 3f2c1b2170af80ee7914ec96c09fa48ab157504e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class RemoveOldCircuitbreakerConfig < ActiveRecord::Migration[4.2]
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def up
    remove_column :application_settings,
                  :circuitbreaker_backoff_threshold
    remove_column :application_settings,
                  :circuitbreaker_failure_wait_time
  end

  def down
    add_column :application_settings,
               :circuitbreaker_backoff_threshold,
               :integer,
               default: 80
    add_column :application_settings,
               :circuitbreaker_failure_wait_time,
               :integer,
               default: 30
  end
end