Skip to content

Commit f91f981

Browse files
authored
Fix message update migration not applying (#1164)
* fix: message update migration not applying * feat: change message updates migration id to trigger re-run
1 parent f884f42 commit f91f981

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/migrations/routines/04-update-message-updates.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,10 +147,10 @@ function convertMessageUpdate(message: Message, update: OldMessageUpdate): Messa
147147
}
148148

149149
const updateMessageUpdates: Migration = {
150-
_id: new ObjectId("5f9f4f4f4f4f4f4f4f4f4f4f"),
150+
_id: new ObjectId("5f9f7f7f7f7f7f7f7f7f7f7f"),
151151
name: "Convert message updates to the new schema",
152152
up: async () => {
153-
const allConversations = collections.conversations.find({}, { projection: { messages: 1 } });
153+
const allConversations = collections.conversations.find({});
154154

155155
let conversation: WithId<Pick<Conversation, "messages">> | null = null;
156156
while ((conversation = await allConversations.tryNext())) {

0 commit comments

Comments
 (0)