| 
									
										
										
										
											2024-09-24 12:55:10 +02:00
										 |  |  | -- Delete data quality records with no linked test case FQN in the test_case table
 | 
					
						
							|  |  |  | DELETE FROM data_quality_data_time_series dqdts
 | 
					
						
							|  |  |  | WHERE NOT EXISTS (
 | 
					
						
							|  |  |  |     SELECT 1
 | 
					
						
							|  |  |  |     FROM test_case tc
 | 
					
						
							|  |  |  |     WHERE dqdts.entityFQNHash = tc.fqnHash
 | 
					
						
							|  |  |  | );
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-09 07:58:45 +02:00
										 |  |  | -- Add FQN and UUID to data_quality_data_time_series records
 | 
					
						
							|  |  |  | UPDATE data_quality_data_time_series dqdts
 | 
					
						
							|  |  |  | SET json = jsonb_set(
 | 
					
						
							|  |  |  |               jsonb_set(dqdts.json::jsonb, '{testCaseFQN}', tc.json->'fullyQualifiedName'),
 | 
					
						
							|  |  |  |               '{id}', to_jsonb(gen_random_uuid())
 | 
					
						
							|  |  |  |           )
 | 
					
						
							|  |  |  | FROM test_case tc
 | 
					
						
							|  |  |  | WHERE dqdts.entityfqnHash = tc.fqnHash;
 | 
					
						
							| 
									
										
										
										
											2024-09-12 08:13:41 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-18 11:58:59 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-12 08:13:41 +02:00
										 |  |  | -- Add id column to data_quality_data_time_series table
 | 
					
						
							|  |  |  | -- after we have added the id values to the records
 | 
					
						
							|  |  |  | ALTER TABLE data_quality_data_time_series
 | 
					
						
							|  |  |  | ADD COLUMN id VARCHAR(36) GENERATED ALWAYS AS (json ->> 'id') STORED,
 | 
					
						
							|  |  |  | ADD CONSTRAINT id_unique UNIQUE (id);
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | -- Create index on id column
 | 
					
						
							|  |  |  | CREATE INDEX IF NOT EXISTS  data_quality_data_time_series_id_index  ON data_quality_data_time_series (id);
 | 
					
						
							| 
									
										
										
										
											2024-09-18 11:58:59 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | -- Remove VIRTUAL status column from test_case table and remove
 | 
					
						
							|  |  |  | -- testCaseResult state from testCase; fetch from search repo.
 | 
					
						
							|  |  |  | ALTER TABLE test_case DROP COLUMN status;
 | 
					
						
							| 
									
										
										
										
											2024-09-25 12:15:26 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | UPDATE test_case SET json = jsonb_set(json, '{testCaseStatus}', json->'testCaseResult'->'testCaseStatus')
 | 
					
						
							|  |  |  | WHERE json->'testCaseResult'->'testCaseStatus' IS NOT NULL;
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-09-18 11:58:59 +02:00
										 |  |  | ALTER TABLE test_case ADD COLUMN status VARCHAR(56) GENERATED ALWAYS AS (json ->> 'testCaseStatus') STORED NULL;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | -- Remove test case result states
 | 
					
						
							|  |  |  | UPDATE test_suite
 | 
					
						
							|  |  |  | SET json = json - 'testCaseResultSummary';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | UPDATE test_case
 | 
					
						
							|  |  |  | SET json = json - 'testCaseResult';
 | 
					
						
							| 
									
										
										
										
											2024-09-25 18:29:32 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | -- Add Supports interrupts to SearchIndexingApplication
 | 
					
						
							|  |  |  | UPDATE apps_marketplace
 | 
					
						
							|  |  |  | SET json = jsonb_set(
 | 
					
						
							|  |  |  | 	json::jsonb,
 | 
					
						
							|  |  |  | 	'{supportsInterrupt}',
 | 
					
						
							|  |  |  | 	to_jsonb(true)
 | 
					
						
							|  |  |  | )
 | 
					
						
							|  |  |  | where name = 'SearchIndexingApplication';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | UPDATE installed_apps
 | 
					
						
							|  |  |  | SET json = jsonb_set(
 | 
					
						
							|  |  |  | 	json::jsonb,
 | 
					
						
							|  |  |  | 	'{supportsInterrupt}',
 | 
					
						
							|  |  |  | 	to_jsonb(true)
 | 
					
						
							|  |  |  | )
 | 
					
						
							| 
									
										
										
										
											2024-10-03 11:00:29 +02:00
										 |  |  | where name = 'SearchIndexingApplication';
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-10-16 11:07:31 +02:00
										 |  |  | -- Add supportsDataDiff for Athena, BigQuery, Mssql, Mysql, Oracle, Postgres, Redshift, SapHana, Snowflake, Trino
 | 
					
						
							|  |  |  | UPDATE dbservice_entity
 | 
					
						
							|  |  |  | SET json = jsonb_set(json::jsonb, '{connection,config,supportsDataDiff}', 'true'::jsonb)
 | 
					
						
							|  |  |  | WHERE serviceType IN ('Athena','BigQuery','Mssql','Mysql','Oracle','Postgres','Redshift','SapHana','Snowflake','Trino');
 | 
					
						
							| 
									
										
										
										
											2024-10-22 07:39:18 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | -- Add supportsSystemProfile for Snowflake, Redshift, and BigQuery
 | 
					
						
							|  |  |  | UPDATE dbservice_entity
 | 
					
						
							|  |  |  | SET json = jsonb_set(json::jsonb, '{connection,config,supportsSystemProfile}', 'true'::jsonb)
 | 
					
						
							|  |  |  | WHERE serviceType IN ('Snowflake', 'Redshift', 'BigQuery');
 | 
					
						
							| 
									
										
										
										
											2024-10-31 00:25:51 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | -- Update all rows in the consumers_dlq table to set the source column to 'publisher'
 | 
					
						
							| 
									
										
										
										
											2024-12-04 16:56:21 +05:30
										 |  |  | UPDATE consumers_dlq SET source = 'publisher';
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-05 04:44:31 +05:30
										 |  |  | DELETE from event_subscription_entity where name = 'ActivityFeedAlert';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | DROP INDEX IF EXISTS event_time_index;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | CREATE INDEX idx_offset_event_time ON change_event ("offset", eventTime);
 |