Commit 954e1892 authored by James Lopez's avatar James Lopez

fix mySQL error

parent 1f701cb5
...@@ -111,6 +111,8 @@ module Gitlab ...@@ -111,6 +111,8 @@ module Gitlab
end end
def extract_epoch(arel_attribute) def extract_epoch(arel_attribute)
return arel_attribute unless Gitlab::Database.postgresql?
Arel.sql(%Q{EXTRACT(EPOCH FROM (#{arel_attribute.to_sql}))}) Arel.sql(%Q{EXTRACT(EPOCH FROM (#{arel_attribute.to_sql}))})
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment