20171123101046_remove_old_circuitbreaker_config.rb 769 Bytes
Newer Older
1 2 3
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

4
class RemoveOldCircuitbreakerConfig < ActiveRecord::Migration[4.2]
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
  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