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

20210317123054_add_throttle_package_registry_columns.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 0bb731306c0e8b0d3cfe0a0d72558322c35b4267 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class AddThrottlePackageRegistryColumns < ActiveRecord::Migration[6.0]
  DOWNTIME = false

  def change
    add_column :application_settings, :throttle_unauthenticated_packages_api_requests_per_period, :integer, default: 800, null: false
    add_column :application_settings, :throttle_unauthenticated_packages_api_period_in_seconds, :integer, default: 15, null: false
    add_column :application_settings, :throttle_authenticated_packages_api_requests_per_period, :integer, default: 1000, null: false
    add_column :application_settings, :throttle_authenticated_packages_api_period_in_seconds, :integer, default: 15, null: false
    add_column :application_settings, :throttle_unauthenticated_packages_api_enabled, :boolean, default: false, null: false
    add_column :application_settings, :throttle_authenticated_packages_api_enabled, :boolean, default: false, null: false
  end
end