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

Created a migration for cooperations #1080

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

PavloButynets
Copy link
Contributor

This PR implements a migration script to clean and standardize the cooperations collection.

Key Changes:

  • Removed: Cooperations with non-existent initiator or receiver.
  • Normalized: Converted proficiencyLevel from array to string or averaged multiple values.
  • Deleted Fields: category, subject, languages.
  • Added Fields: title and section (validated structure).
  • Renamed Field: description → additionalInfo.

Tests:

  • Verified deletion of invalid cooperations.
  • Ensured proper creation of new fields.
  • Confirmed removal of unnecessary fields.
  • Checked presence of additionalInfo field.
  • Validated that only incorrect documents are updated.

…ng to the task description, added tests to verify the correctness of this migration
@PavloButynets PavloButynets self-assigned this Dec 22, 2024
@PavloButynets PavloButynets changed the title Wrote a migration for cooperations Created a migration for cooperations Dec 22, 2024
Copy link
Contributor

@luiqor luiqor left a comment

Choose a reason for hiding this comment

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

Please take a look at these two new sonar issues
image

@PavloButynets PavloButynets requested a review from luiqor December 28, 2024 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(SP:5) Migration task: Update the old cooperations according to the current scheme
3 participants