debian-mirror-gitlab/db/migrate/20210317123054_add_throttle_package_registry_columns.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
918 B
Ruby
Raw Normal View History

2021-06-08 01:23:25 +05:30
# 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