From f1df209bed8c7c884883e4f6744090ec33e8c0fe Mon Sep 17 00:00:00 2001 From: sonika-shah <58761340+sonika-shah@users.noreply.github.com> Date: Thu, 21 Aug 2025 14:33:37 +0530 Subject: [PATCH] Add missing domain migrations for entity version history (#23032) --- .../sql/migrations/native/1.9.2/mysql/schemaChanges.sql | 8 ++++++++ .../migrations/native/1.9.2/postgres/schemaChanges.sql | 3 +++ 2 files changed, 11 insertions(+) diff --git a/bootstrap/sql/migrations/native/1.9.2/mysql/schemaChanges.sql b/bootstrap/sql/migrations/native/1.9.2/mysql/schemaChanges.sql index e69de29bb2d..92c6d4ee4fd 100644 --- a/bootstrap/sql/migrations/native/1.9.2/mysql/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.9.2/mysql/schemaChanges.sql @@ -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; diff --git a/bootstrap/sql/migrations/native/1.9.2/postgres/schemaChanges.sql b/bootstrap/sql/migrations/native/1.9.2/postgres/schemaChanges.sql index e69de29bb2d..21815466d8e 100644 --- a/bootstrap/sql/migrations/native/1.9.2/postgres/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.9.2/postgres/schemaChanges.sql @@ -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; \ No newline at end of file