From dfe6204b553fa9b2155b3da71fbd913100d93794 Mon Sep 17 00:00:00 2001 From: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:51:03 +0530 Subject: [PATCH] Remove SQls from 1.3.2 (#15917) --- .../native/1.3.2/mysql/schemaChanges.sql | 23 ---------------- .../native/1.3.2/postgres/schemaChanges.sql | 26 ------------------- 2 files changed, 49 deletions(-) diff --git a/bootstrap/sql/migrations/native/1.3.2/mysql/schemaChanges.sql b/bootstrap/sql/migrations/native/1.3.2/mysql/schemaChanges.sql index 85a08819d7b..d8d880adcca 100644 --- a/bootstrap/sql/migrations/native/1.3.2/mysql/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.3.2/mysql/schemaChanges.sql @@ -1,26 +1,3 @@ ALTER TABLE test_case ADD COLUMN status VARCHAR(56) GENERATED ALWAYS AS (json ->> '$.testCaseResult.testCaseStatus') STORED NULL; ALTER TABLE test_case ADD COLUMN entityLink VARCHAR(512) GENERATED ALWAYS AS (json ->> '$.entityLink') STORED NOT NULL; --- Change scheduleType to scheduleTimeline -UPDATE installed_apps -SET json = JSON_INSERT( - JSON_REMOVE(json, '$.appSchedule.scheduleType'), - '$.appSchedule.scheduleTimeline', - JSON_EXTRACT(json, '$.appSchedule.scheduleType') - ); -delete from apps_extension_time_series; - - --- Change systemApp to system -UPDATE installed_apps -SET json = JSON_INSERT( - JSON_REMOVE(json, '$.systemApp'), - '$.system', - JSON_EXTRACT(json, '$.systemApp') - ); -UPDATE apps_marketplace -SET json = JSON_INSERT( - JSON_REMOVE(json, '$.systemApp'), - '$.system', - JSON_EXTRACT(json, '$.systemApp') - ); diff --git a/bootstrap/sql/migrations/native/1.3.2/postgres/schemaChanges.sql b/bootstrap/sql/migrations/native/1.3.2/postgres/schemaChanges.sql index 75999d92860..957d395251f 100644 --- a/bootstrap/sql/migrations/native/1.3.2/postgres/schemaChanges.sql +++ b/bootstrap/sql/migrations/native/1.3.2/postgres/schemaChanges.sql @@ -1,28 +1,2 @@ ALTER TABLE test_case ADD COLUMN status VARCHAR(56) GENERATED ALWAYS AS (json -> 'testCaseResult' ->> 'testCaseStatus') STORED NULL; ALTER TABLE test_case ADD COLUMN entityLink VARCHAR(512) GENERATED ALWAYS AS (json ->> 'entityLink') STORED NOT NULL; - --- change scheduleType to scheduleTimeline -UPDATE installed_apps -SET json = jsonb_set( - json::jsonb #- '{appSchedule,scheduleType}', - '{appSchedule,scheduleTimeline}', - (json #> '{appSchedule,scheduleType}')::jsonb, - true - ); -delete from apps_extension_time_series; - --- Change systemApp to system -UPDATE installed_apps -SET json = jsonb_set( - json::jsonb #- '{systemApp}', - '{system}', - (json #> '{systemApp}')::jsonb, - true - ); -UPDATE apps_marketplace -SET json = jsonb_set( - json::jsonb #- '{systemApp}', - '{system}', - (json #> '{systemApp}')::jsonb, - true - );