OpenMetadata/bootstrap/sql/migrations/native/1.10.2/mysql/postDataMigrationSQLScript.sql

8 lines
293 B
SQL

UPDATE test_definition
SET json = JSON_ARRAY_INSERT(
json,
CONCAT('$.supportedDataTypes[', JSON_LENGTH(json, '$.supportedDataTypes'), ']'),
'NUMERIC'
)
WHERE JSON_CONTAINS(json->'$.supportedDataTypes', '"NUMBER"')
AND NOT JSON_CONTAINS(json->'$.supportedDataTypes', '"NUMERIC"');