-
Couldn't load subscription status.
- Fork 58
fix(server): add deleted migration to allow following migrations to execute #1882
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
base: main
Are you sure you want to change the base?
Conversation
Updates the metadata migration logic to address issues with project metadata updates. Removes unnecessary fields from the project collection and ensures existing metadata is updated properly. Renames the migration function for clarity and updates the migration registry to reflect the name change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a migration execution issue by re-adding a previously deleted migration and renaming a conflicting migration. The migration 251022100000: ConvertTopicsToString was missing, preventing the subsequent 251022133500 migration from executing. The fix adds back the deleted migration and renames the 251022133500 migration to UpdateProjectMetadataFieldsFix to differentiate it from the 251022100100 migration.
Key Changes:
- Re-added migration
251022100000: ConvertTopicsToStringto convert topics from array to string format - Renamed
251022133500migration function toUpdateProjectMetadataFieldsFixto avoid naming conflicts - Created new file for
251022100100migration withUpdateProjectMetadataFieldsfunction
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| migrations.go | Added missing migration entry and renamed conflicting migration reference |
| 251022133500_update_project_metadata_fields.go | Renamed function to UpdateProjectMetadataFieldsFix |
| 251022100100_update_project_metadata_fields.go | New file containing the UpdateProjectMetadataFields migration |
| 251022100000_convert_topics_to_string.go | New file containing the ConvertTopicsToString migration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
server/internal/infrastructure/mongo/migration/251022100100_update_project_metadata_fields.go
Show resolved
Hide resolved
server/internal/infrastructure/mongo/migration/251022100100_update_project_metadata_fields.go
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
251022100000: ConvertTopicsToStringand renames251022133500migration to allow251022133500migration to execute