diff options
author | Andreas Brandl <abrandl@gitlab.com> | 2019-07-24 15:59:55 +0200 |
---|---|---|
committer | Andreas Brandl <abrandl@gitlab.com> | 2019-07-29 12:47:06 +0200 |
commit | 988dc80585c6e52970e94f22dff6bc1e4c786e9e (patch) | |
tree | fa46a90181e23ec86c5e25288e5b83451ce5b27f /lib/gitlab/contributions_calendar.rb | |
parent | ca05130319ae9d74ee7771b5a8adb6cf25857fb7 (diff) | |
download | gitlab-ce-988dc80585c6e52970e94f22dff6bc1e4c786e9e.tar.gz |
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/contributions_calendar.rb')
-rw-r--r-- | lib/gitlab/contributions_calendar.rb | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/gitlab/contributions_calendar.rb b/lib/gitlab/contributions_calendar.rb index f7d046600e8..5b0b91de5da 100644 --- a/lib/gitlab/contributions_calendar.rb +++ b/lib/gitlab/contributions_calendar.rb @@ -84,11 +84,7 @@ module Gitlab .and(t[:created_at].lteq(Date.current.end_of_day)) .and(t[:author_id].eq(contributor.id)) - date_interval = if Gitlab::Database.postgresql? - "INTERVAL '#{Time.zone.now.utc_offset} seconds'" - else - "INTERVAL #{Time.zone.now.utc_offset} SECOND" - end + date_interval = "INTERVAL '#{Time.zone.now.utc_offset} seconds'" Event.reorder(nil) .select(t[:project_id], t[:target_type], t[:action], "date(created_at + #{date_interval}) AS date", 'count(id) as total_amount') |