summaryrefslogtreecommitdiff
path: root/db/migrate/20210819120243_add_throttle_files_api_columns.rb
blob: ace093c7b0c743db9c23bc3878aa9d17a3c88cac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

class AddThrottleFilesApiColumns < ActiveRecord::Migration[6.1]
  def change
    add_column :application_settings, :throttle_unauthenticated_files_api_requests_per_period, :integer, default: 125, null: false
    add_column :application_settings, :throttle_unauthenticated_files_api_period_in_seconds, :integer, default: 15, null: false
    add_column :application_settings, :throttle_authenticated_files_api_requests_per_period, :integer, default: 500, null: false
    add_column :application_settings, :throttle_authenticated_files_api_period_in_seconds, :integer, default: 15, null: false

    add_column :application_settings, :throttle_unauthenticated_files_api_enabled, :boolean, default: false, null: false
    add_column :application_settings, :throttle_authenticated_files_api_enabled, :boolean, default: false, null: false
  end
end