diff --git a/bootstrap/sql/migrations/native/1.6.0/mysql/postDataMigrationSQLScript.sql b/bootstrap/sql/migrations/native/1.6.0/mysql/postDataMigrationSQLScript.sql index 04bf3b4dd17..0ad7d922a4e 100644 --- a/bootstrap/sql/migrations/native/1.6.0/mysql/postDataMigrationSQLScript.sql +++ b/bootstrap/sql/migrations/native/1.6.0/mysql/postDataMigrationSQLScript.sql @@ -43,3 +43,18 @@ UPDATE installed_apps SET json = JSON_SET(json, '$.supportsInterrupt', true) whe UPDATE apps_marketplace SET json = JSON_SET(json, '$.supportsInterrupt', true) where name = 'SearchIndexingApplication'; ALTER TABLE apps_extension_time_series ADD COLUMN appName VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.appName') STORED NOT NULL; + +-- Update serviceType in api_endpoint_entity table +UPDATE api_endpoint_entity +SET json = JSON_SET(json, '$.serviceType', 'Rest') +WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.serviceType')) = 'REST'; + +-- Update serviceType in api_service_entity table +UPDATE api_service_entity +SET json = JSON_SET(json, '$.serviceType', 'Rest') +WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.serviceType')) = 'REST'; + +-- Update serviceType in api_collection_entity table +UPDATE api_collection_entity +SET json = JSON_SET(json, '$.serviceType', 'Rest') +WHERE JSON_UNQUOTE(JSON_EXTRACT(json, '$.serviceType')) = 'REST'; \ No newline at end of file diff --git a/bootstrap/sql/migrations/native/1.6.0/postgres/postDataMigrationSQLScript.sql b/bootstrap/sql/migrations/native/1.6.0/postgres/postDataMigrationSQLScript.sql index e7de73cc09b..0ea510e4231 100644 --- a/bootstrap/sql/migrations/native/1.6.0/postgres/postDataMigrationSQLScript.sql +++ b/bootstrap/sql/migrations/native/1.6.0/postgres/postDataMigrationSQLScript.sql @@ -60,3 +60,18 @@ SET json = jsonb_set( where name = 'SearchIndexingApplication'; ALTER TABLE apps_extension_time_series ADD COLUMN appName VARCHAR(256) GENERATED ALWAYS AS (json ->> 'appName') STORED NOT NULL; + +-- Update serviceType in api_endpoint_entity table +UPDATE api_endpoint_entity +SET json = jsonb_set(json, '{serviceType}', '"Rest"') +WHERE jsonb_extract_path_text(json, 'serviceType') = 'REST'; + +-- Update serviceType in api_service_entity table +UPDATE api_service_entity +SET json = jsonb_set(json, '{serviceType}', '"Rest"') +WHERE jsonb_extract_path_text(json, 'serviceType') = 'REST'; + +-- Update serviceType in api_collection_entity table +UPDATE api_collection_entity +SET json = jsonb_set(json, '{serviceType}', '"Rest"') +WHERE jsonb_extract_path_text(json, 'serviceType') = 'REST'; \ No newline at end of file