From 988dc80585c6e52970e94f22dff6bc1e4c786e9e Mon Sep 17 00:00:00 2001 From: Andreas Brandl Date: Wed, 24 Jul 2019 15:59:55 +0200 Subject: 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. --- app/services/cohorts_service.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/services/cohorts_service.rb') diff --git a/app/services/cohorts_service.rb b/app/services/cohorts_service.rb index 6d466c2fc9c..97fbb70f350 100644 --- a/app/services/cohorts_service.rb +++ b/app/services/cohorts_service.rb @@ -95,10 +95,6 @@ class CohortsService # rubocop: enable CodeReuse/ActiveRecord def column_to_date(column) - if Gitlab::Database.postgresql? - "CAST(DATE_TRUNC('month', #{column}) AS date)" - else - "STR_TO_DATE(DATE_FORMAT(#{column}, '%Y-%m-01'), '%Y-%m-%d')" - end + "CAST(DATE_TRUNC('month', #{column}) AS date)" end end -- cgit v1.2.1