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.
		
		
		
		
		
			
		
			
				
	
	
		
			18 lines
		
	
	
		
			581 B
		
	
	
	
		
			JavaScript
		
	
			
		
		
	
	
			18 lines
		
	
	
		
			581 B
		
	
	
	
		
			JavaScript
		
	
| exports.run = ({ transaction, logger }) => {
 | |
|   const messagesStore = transaction.objectStore('messages');
 | |
| 
 | |
|   logger.info("Create message attachment metadata index: 'hasAttachments'");
 | |
|   messagesStore.createIndex(
 | |
|     'hasAttachments',
 | |
|     ['conversationId', 'hasAttachments', 'received_at'],
 | |
|     { unique: false }
 | |
|   );
 | |
| 
 | |
|   ['hasVisualMediaAttachments', 'hasFileAttachments'].forEach(name => {
 | |
|     logger.info(`Create message attachment metadata index: '${name}'`);
 | |
|     messagesStore.createIndex(name, ['conversationId', 'received_at', name], {
 | |
|       unique: false,
 | |
|     });
 | |
|   });
 | |
| };
 |