| 
									
										
										
										
											2024-04-11 15:13:16 +05:30
										 |  |  | -- 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'
 | 
					
						
							| 
									
										
										
										
											2024-04-11 19:41:50 +05:30
										 |  |  | WHERE jsonb_exists(json::jsonb, 'systemApp') = true;
 | 
					
						
							| 
									
										
										
										
											2024-04-11 15:13:16 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | UPDATE apps_marketplace
 | 
					
						
							|  |  |  | SET json = jsonb_set(
 | 
					
						
							|  |  |  |         json::jsonb,
 | 
					
						
							|  |  |  |         '{system}',
 | 
					
						
							|  |  |  |         json->'systemApp'
 | 
					
						
							|  |  |  |     ) - 'systemApp'
 | 
					
						
							| 
									
										
										
										
											2024-04-11 19:41:50 +05:30
										 |  |  | WHERE jsonb_exists(json::jsonb, 'systemApp') = true;
 |