Remove use of JSON_ARRAYAGG (#5350)

Not supported in MySQL < 5.7.22
This commit is contained in:
Michal Nicpon 2022-04-25 14:43:08 -06:00 committed by GitHub
parent bd18bf3c7d
commit a64982f96c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -0,0 +1,2 @@
* Remove usage of JSON_ARRAYAGG in sql queries. Not supported in MySQL < 5.7.22 and
AWS RDS Aurora used in Terraform.

View file

@ -1672,13 +1672,13 @@ SELECT
team_id id,
'os_versions' type,
COALESCE(
JSON_ARRAYAGG(
CONCAT('[', GROUP_CONCAT(
JSON_OBJECT(
'hosts_count', hosts_count,
'name', name,
'platform', platform
)
),
), ']'),
JSON_ARRAY()
) json_value
FROM