fix mySQL error

This commit is contained in:
James Lopez 2016-10-21 11:37:47 +02:00
parent 1f701cb5e2
commit 954e18922e

View file

@ -111,6 +111,8 @@ module Gitlab
end
def extract_epoch(arel_attribute)
return arel_attribute unless Gitlab::Database.postgresql?
Arel.sql(%Q{EXTRACT(EPOCH FROM (#{arel_attribute.to_sql}))})
end