diff options
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r-- | lib/gitlab/database.rb | 30 |
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? |