Remove SQls from 1.3.2 (#15917)

This commit is contained in:
Mohit Yadav 2024-04-16 18:51:03 +05:30 committed by GitHub
parent 23eb4ee1c9
commit dfe6204b55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 0 additions and 49 deletions

View File

@ -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')
);

View File

@ -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
);