You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
	
	
		
			17 lines
		
	
	
		
			406 B
		
	
	
	
		
			JavaScript
		
	
		
		
			
		
	
	
			17 lines
		
	
	
		
			406 B
		
	
	
	
		
			JavaScript
		
	
| 
											8 years ago
										 | exports.run = (transaction) => { | ||
|  |   const messagesStore = transaction.objectStore('messages'); | ||
|  | 
 | ||
|  |   [ | ||
|  |     'numAttachments', | ||
|  |     'numVisualMediaAttachments', | ||
|  |     'numFileAttachments', | ||
|  |   ].forEach((name) => { | ||
|  |     console.log(`Create message attachment metadata index: '${name}'`); | ||
|  |     messagesStore.createIndex( | ||
|  |       name, | ||
|  |       ['conversationId', 'received_at', name], | ||
|  |       { unique: false } | ||
|  |     ); | ||
|  |   }); | ||
|  | }; |