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>2020-08-28 16:14:44 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-08-28 16:14:44 +0300
commite7b5a68daecd0aff0cc66666cb38c7971027a05a (patch)
treeb153db785557cc807da5e623cb130a1ef384926e /lib/gitlab/database.rb
parentc8fb2e6a3942330079bde06d919cd33c6bc7600e (diff)
Add latest changes from gitlab-org/gitlab@13-3-stable-ee
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r--lib/gitlab/database.rb30
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb
index e7df9fd27f0..990c940d200 100644
--- a/lib/gitlab/database.rb
+++ b/lib/gitlab/database.rb
@@ -6,20 +6,6 @@ module Gitlab
# https://docs.gitlab.com/ee/install/requirements.html#postgresql-requirements
MINIMUM_POSTGRES_VERSION = 11
- # Upcoming PostgreSQL version requirements
- # Allows a soft warning about an upcoming minimum version requirement
- # so administrators can prepare to upgrade
- UPCOMING_POSTGRES_VERSION_DETAILS = {
- gl_version: '13.6.0',
- gl_version_date: 'November 22, 2020',
- pg_version_minimum: 12,
- url: 'https://gitlab.com/groups/gitlab-org/-/epics/2374'
- }.freeze
-
- # Specifies the maximum number of days in advance to display a notice
- # regarding an upcoming PostgreSQL version deprecation.
- DEPRECATION_WINDOW_DAYS = 90
-
# https://www.postgresql.org/docs/9.2/static/datatype-numeric.html
MAX_INT_VALUE = 2147483647
MIN_INT_VALUE = -2147483648
@@ -114,22 +100,6 @@ module Gitlab
version.to_f >= MINIMUM_POSTGRES_VERSION
end
- def self.postgresql_upcoming_deprecation?
- version.to_f < UPCOMING_POSTGRES_VERSION_DETAILS[:pg_version_minimum]
- end
-
- def self.days_until_deprecation
- (
- Date.parse(UPCOMING_POSTGRES_VERSION_DETAILS[:gl_version_date]) -
- Date.today
- ).to_i
- end
- private_class_method :days_until_deprecation
-
- def self.within_deprecation_notice_window?
- days_until_deprecation <= DEPRECATION_WINDOW_DAYS
- end
-
def self.check_postgres_version_and_print_warning
return if Gitlab::Database.postgresql_minimum_supported_version?
return if Gitlab::Runtime.rails_runner?