| 
									
										
										
										
											2025-07-18 21:53:43 -07:00
										 |  |  | -- Create table for tracking index mapping versions
 | 
					
						
							|  |  |  | CREATE TABLE IF NOT EXISTS index_mapping_versions (
 | 
					
						
							|  |  |  |     entityType VARCHAR(256) NOT NULL,
 | 
					
						
							|  |  |  |     mappingHash VARCHAR(32) COLLATE ascii_bin NOT NULL,
 | 
					
						
							|  |  |  |     mappingJson JSON NOT NULL,
 | 
					
						
							|  |  |  |     version VARCHAR(36) NOT NULL,
 | 
					
						
							|  |  |  |     updatedAt BIGINT UNSIGNED NOT NULL,
 | 
					
						
							|  |  |  |     updatedBy VARCHAR(256) NOT NULL,
 | 
					
						
							|  |  |  |     PRIMARY KEY (entityType),
 | 
					
						
							|  |  |  |     INDEX idx_version (version),
 | 
					
						
							|  |  |  |     INDEX idx_updatedAt (updatedAt)
 | 
					
						
							| 
									
										
										
										
											2025-07-31 10:08:21 +05:30
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-22 09:28:11 +05:30
										 |  |  | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | -- remove old reset link email template
 | 
					
						
							|  |  |  | DELETE from doc_store where name = 'reset-link' and entityType = 'EmailTemplate';
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | -- In case 1.7.3 migrations executed , with --force , remove it from server_logs as it is covered in this migration
 | 
					
						
							|  |  |  | DELETE FROM SERVER_CHANGE_LOG WHERE version = '1.7.3';
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-07-23 02:14:18 -07:00
										 |  |  | -- Update ingestion pipeline configurations to set markDeletedSchemas and markDeletedDatabases to false
 | 
					
						
							|  |  |  | UPDATE ingestion_pipeline_entity
 | 
					
						
							|  |  |  | SET json = JSON_SET(
 | 
					
						
							|  |  |  |     JSON_SET(json, '$.sourceConfig.config.markDeletedSchemas', false),
 | 
					
						
							|  |  |  |     '$.sourceConfig.config.markDeletedDatabases', false
 | 
					
						
							|  |  |  | )
 | 
					
						
							| 
									
										
										
										
											2025-07-31 10:08:21 +05:30
										 |  |  | WHERE JSON_EXTRACT(json, '$.sourceConfig.config.type') = 'DatabaseMetadata';
 |