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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb')
-rw-r--r--db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb b/db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb
new file mode 100644
index 00000000000..bc515bc061c
--- /dev/null
+++ b/db/migrate/20210830085837_add_throttle_authenticated_git_lfs_columns.rb
@@ -0,0 +1,23 @@
+# frozen_string_literal: true
+
+class AddThrottleAuthenticatedGitLfsColumns < ActiveRecord::Migration[6.1]
+ include Gitlab::Database::MigrationHelpers
+
+ disable_ddl_transaction!
+
+ def up
+ with_lock_retries do
+ add_column :application_settings, :throttle_authenticated_git_lfs_requests_per_period, :integer, default: 1000, null: false
+ add_column :application_settings, :throttle_authenticated_git_lfs_period_in_seconds, :integer, default: 60, null: false
+ add_column :application_settings, :throttle_authenticated_git_lfs_enabled, :boolean, default: false, null: false
+ end
+ end
+
+ def down
+ with_lock_retries do
+ remove_column :application_settings, :throttle_authenticated_git_lfs_requests_per_period
+ remove_column :application_settings, :throttle_authenticated_git_lfs_period_in_seconds
+ remove_column :application_settings, :throttle_authenticated_git_lfs_enabled, :boolean
+ end
+ end
+end