Add missing domain migrations for entity version history (#23032)

This commit is contained in:
sonika-shah 2025-08-21 14:33:37 +05:30 committed by sonikashah
parent 5d790455b0
commit f1df209bed
2 changed files with 11 additions and 0 deletions

View File

@ -0,0 +1,8 @@
-- Update entity_extension to move domain to array
update entity_extension set json = JSON_SET(
JSON_REMOVE(json, '$.domain'),
'$.domains',
JSON_ARRAY(
JSON_EXTRACT(json, '$.domain')
)
) where json -> '$.domain' is not null;

View File

@ -0,0 +1,3 @@
-- Update entity_extension to move domain to array
update entity_extension set json = jsonb_set(json#-'{domain}', '{domains}',
jsonb_build_array(json#>'{domain}')) where json #>> '{domain}' is not null;