Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix message update migration not applying #1164

Merged
merged 2 commits into from
May 25, 2024
Merged

Conversation

Saghen
Copy link
Contributor

@Saghen Saghen commented May 24, 2024

Fixes the message update migrations needed as part of #996 not applying to the tools objects.

@Saghen Saghen requested a review from mishig25 May 24, 2024 01:05
@Saghen Saghen self-assigned this May 24, 2024
@gary149
Copy link
Collaborator

gary149 commented May 24, 2024

feel free to merge directly @mishig25

@@ -150,7 +150,7 @@ const updateMessageUpdates: Migration = {
_id: new ObjectId("5f9f4f4f4f4f4f4f4f4f4f4f"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't we have to change the id?
Otherwise, since migration with this id was already recorded as done, it will not run. No?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or should we create new migration src/lib/migrations/routines/06-xyz.ts ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the idea was to delete the existing migration flag in the prod db so it would run again. But I think migrations should be append only no? Not sure how we could squash them together effectively

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah good call, updated the id so it will run again. The first run didn't work so this should be safe

@nsarrazin nsarrazin merged commit f91f981 into main May 25, 2024
3 checks passed
@nsarrazin nsarrazin deleted the fix/message-update-migration branch May 25, 2024 16:02
@nsarrazin nsarrazin added the bug Something isn't working label May 28, 2024
ice91 pushed a commit to ice91/chat-ui that referenced this pull request Oct 30, 2024
* fix: message update migration not applying

* feat: change message updates migration id to trigger re-run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants