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