feat: add migration for message mid to array #751
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR introduces the migration necessary to support the changes made in [Previous PR #745 ]. The previous PR modified the
mid
field in the Message schema from a string to an array of strings to handle cases where multiple message IDs need to be linked to a single logical message (e.g., Slack messages requiring multiple separate messages for attachments and quick replies).Dependency:
This PR depends on [Previous PR #745 ], and it should not be merged before that PR is merged.
Migration Details:
Up Migration: Converts existing
mid
fields (currently strings) into arrays containing the original value.Down Migration: Reverts the change by extracting the first element from the array and setting it back as a string.
🚨 Note:
The migration version (present in the migration name) is arbitrary and must be corrected before merging.