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:
authorAndreas Brandl <abrandl@gitlab.com>2019-07-24 16:59:55 +0300
committerAndreas Brandl <abrandl@gitlab.com>2019-07-29 13:47:06 +0300
commit988dc80585c6e52970e94f22dff6bc1e4c786e9e (patch)
treefa46a90181e23ec86c5e25288e5b83451ce5b27f /lib/gitlab/database.rb
parentca05130319ae9d74ee7771b5a8adb6cf25857fb7 (diff)
Further remove code branches by database type
We dropped MySQL support and a lot of mysql specific code has been removed in https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/29608. This comes in from the other direction and removes any `if postgresql?` branches.
Diffstat (limited to 'lib/gitlab/database.rb')
-rw-r--r--lib/gitlab/database.rb9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/gitlab/database.rb b/lib/gitlab/database.rb
index eef63536de4..cbdff0ab060 100644
--- a/lib/gitlab/database.rb
+++ b/lib/gitlab/database.rb
@@ -46,6 +46,7 @@ module Gitlab
end
end
+ # @deprecated
def self.postgresql?
adapter_name.casecmp('postgresql').zero?
end
@@ -79,19 +80,19 @@ module Gitlab
end
def self.postgresql_9_or_less?
- postgresql? && version.to_f < 10
+ version.to_f < 10
end
def self.join_lateral_supported?
- postgresql? && version.to_f >= 9.3
+ version.to_f >= 9.3
end
def self.replication_slots_supported?
- postgresql? && version.to_f >= 9.4
+ version.to_f >= 9.4
end
def self.postgresql_minimum_supported_version?
- postgresql? && version.to_f >= 9.6
+ version.to_f >= 9.6
end
# map some of the function names that changed between PostgreSQL 9 and 10