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:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-04-20 13:00:54 +0300
commit3cccd102ba543e02725d247893729e5c73b38295 (patch)
treef36a04ec38517f5deaaacb5acc7d949688d1e187 /db/post_migrate/20220322205008_change_search_rate_limit_values.rb
parent205943281328046ef7b4528031b90fbda70c75ac (diff)
Add latest changes from gitlab-org/gitlab@14-10-stable-eev14.10.0-rc42
Diffstat (limited to 'db/post_migrate/20220322205008_change_search_rate_limit_values.rb')
-rw-r--r--db/post_migrate/20220322205008_change_search_rate_limit_values.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20220322205008_change_search_rate_limit_values.rb b/db/post_migrate/20220322205008_change_search_rate_limit_values.rb
new file mode 100644
index 00000000000..ed4aad72ddf
--- /dev/null
+++ b/db/post_migrate/20220322205008_change_search_rate_limit_values.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class ChangeSearchRateLimitValues < Gitlab::Database::Migration[1.0]
+ def up
+ # Change search_rate_limits to a more reasonable value
+ # as long as they are still using the default values.
+ #
+ # The reason why `search_rate_limit` could be either 30 or 60
+ # is because its value was ported over from the now deprecated
+ # `user_email_lookup_limit` which had a default value of 60.
+ execute("update application_settings set search_rate_limit=300 where search_rate_limit IN (30,60)")
+ execute("update application_settings set search_rate_limit_unauthenticated=100 where search_rate_limit_unauthenticated = 10")
+ end
+
+ def down
+ # noop. Because this migration is updating values, it is not reversible.
+ end
+end