Delete before forced bulk insert to fix broken migrations
This commit is contained in:
@@ -37,6 +37,7 @@ module.exports = {
|
||||
saveMessage,
|
||||
saveMessages,
|
||||
removeMessage,
|
||||
_removeMessages,
|
||||
getUnreadByConversation,
|
||||
|
||||
removeAllMessagesInConversation,
|
||||
@@ -220,6 +221,11 @@ async function removeMessage(id, { Message }) {
|
||||
}
|
||||
}
|
||||
|
||||
// Note: this method will not clean up external files, just delete from SQL
|
||||
async function _removeMessages(ids) {
|
||||
await channels.removeMessage(ids);
|
||||
}
|
||||
|
||||
async function getMessageById(id, { Message }) {
|
||||
const message = await channels.getMessageById(id);
|
||||
return new Message(message);
|
||||
|
Reference in New Issue
Block a user