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

18 lines
567 B
JavaScript
Raw Normal View History

2018-04-27 21:25:04 +00:00
exports.run = transaction => {
const messagesStore = transaction.objectStore('messages');
console.log("Create message attachment metadata index: 'hasAttachments'");
messagesStore.createIndex(
'hasAttachments',
['conversationId', 'hasAttachments', 'received_at'],
{ unique: false }
);
2018-04-27 21:25:04 +00:00
['hasVisualMediaAttachments', 'hasFileAttachments'].forEach(name => {
console.log(`Create message attachment metadata index: '${name}'`);
2018-04-27 21:25:04 +00:00
messagesStore.createIndex(name, ['conversationId', 'received_at', name], {
unique: false,
});
});
};