signal-desktop/js/modules/migrations/18/index.js

17 lines
406 B
JavaScript
Raw Normal View History

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 }
);
});
};