summaryrefslogtreecommitdiff
path: root/db/post_migrate/20180914201132_remove_sidekiq_throttling_from_application_settings.rb
blob: b3ed0d3f1e981ad32385ff511bc04c67af2491c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.

class RemoveSidekiqThrottlingFromApplicationSettings < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  DOWNTIME = false

  def change
    remove_column :application_settings, :sidekiq_throttling_enabled, :boolean, default: false
    remove_column :application_settings, :sidekiq_throttling_queues, :string
    remove_column :application_settings, :sidekiq_throttling_factor, :decimal

    Rails.cache.delete("ApplicationSetting:#{Gitlab::VERSION}:#{Rails.version}")
  end
end