mirror of
https://github.com/open-metadata/OpenMetadata
synced 2026-05-24 09:39:11 +00:00
11 lines
550 B
SQL
11 lines
550 B
SQL
-- Migrate REST API service connections: move flat openAPISchemaURL into nested openAPISchemaConnection object
|
|
UPDATE api_service_entity
|
|
SET json = jsonb_set(
|
|
json #- '{connection,config,openAPISchemaURL}',
|
|
'{connection,config,openAPISchemaConnection}',
|
|
jsonb_build_object('openAPISchemaURL', json #> '{connection,config,openAPISchemaURL}'),
|
|
true
|
|
)
|
|
WHERE serviceType = 'Rest'
|
|
AND jsonb_exists(json -> 'connection' -> 'config', 'openAPISchemaURL')
|
|
AND NOT jsonb_exists(json -> 'connection' -> 'config', 'openAPISchemaConnection');
|