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