Add migration for media gallery indices
parent
273248d3fd
commit
5f220a7b2c
@ -0,0 +1,16 @@
|
|||||||
|
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 }
|
||||||
|
);
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue