mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	feat: events table type column index (#7838)
Adding index on even table type column, since we are running queries on top of it.
This commit is contained in:
		
							parent
							
								
									8091987aaa
								
							
						
					
					
						commit
						624c6ce9c3
					
				
							
								
								
									
										19
									
								
								src/migrations/20240812132633-events-type-index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								src/migrations/20240812132633-events-type-index.js
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,19 @@
 | 
			
		||||
'use strict';
 | 
			
		||||
 | 
			
		||||
exports.up = function (db, callback) {
 | 
			
		||||
    db.runSql(
 | 
			
		||||
        `
 | 
			
		||||
        CREATE INDEX idx_events_type ON events (type);
 | 
			
		||||
        `,
 | 
			
		||||
        callback,
 | 
			
		||||
    );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
exports.down = function (db, callback) {
 | 
			
		||||
    db.runSql(
 | 
			
		||||
        `
 | 
			
		||||
        DROP INDEX IF EXISTS idx_events_type;
 | 
			
		||||
        `,
 | 
			
		||||
        callback,
 | 
			
		||||
    );
 | 
			
		||||
};
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user