Commit cff72930 authored by Jasper Maes's avatar Jasper Maes

Rails5 fix connection execute return integer instead of string

parent 6d4a0325
---
title: Rails5 fix connection execute return integer instead of string
merge_request: 19901
author: Jasper Maes
type: fixed
......@@ -17,7 +17,7 @@ module Gitlab
def check
catch_timeout 10.seconds do
if Gitlab::Database.postgresql?
ActiveRecord::Base.connection.execute('SELECT 1 as ping')&.first&.[]('ping')
ActiveRecord::Base.connection.execute('SELECT 1 as ping')&.first&.[]('ping')&.to_s
else
ActiveRecord::Base.connection.execute('SELECT 1 as ping')&.first&.first&.to_s
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