diff --git a/bootstrap/sql/migrations/native/1.3.3/mysql/schemaChanges.sql b/bootstrap/sql/migrations/native/1.3.3/mysql/schemaChanges.sql new file mode 100644 index 00000000000..19d35f21cc8 --- /dev/null +++ b/bootstrap/sql/migrations/native/1.3.3/mysql/schemaChanges.sql @@ -0,0 +1 @@ +-- Nothing to add here. 1.3.3 migrations only needed for postgres \ No newline at end of file diff --git a/bootstrap/sql/migrations/native/1.3.3/postgres/schemaChanges.sql b/bootstrap/sql/migrations/native/1.3.3/postgres/schemaChanges.sql new file mode 100644 index 00000000000..840557a6173 --- /dev/null +++ b/bootstrap/sql/migrations/native/1.3.3/postgres/schemaChanges.sql @@ -0,0 +1,32 @@ +-- change scheduleType to scheduleTimeline, this was failing earlier in 1.3.2 so updating it here +UPDATE installed_apps +SET json = jsonb_set( + json::jsonb, + '{appSchedule}', + jsonb_set( + json->'appSchedule', + '{scheduleTimeline}', + json->'appSchedule'->'scheduleType' + ) - 'scheduleType', + true + ) +WHERE json->'appSchedule'->>'scheduleType' IS NOT NULL; + +delete from apps_extension_time_series; + +-- Change systemApp to system, this was failing earlier in 1.3.2 so updating it here +UPDATE installed_apps +SET json = jsonb_set( + json::jsonb, + '{system}', + json->'systemApp' + ) - 'systemApp' +WHERE json ? 'systemApp'; + +UPDATE apps_marketplace +SET json = jsonb_set( + json::jsonb, + '{system}', + json->'systemApp' + ) - 'systemApp' +WHERE json ? 'systemApp';