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

(SP:) Migration Task: Fix and add resourceType to Quizzes #1140

Open
PavloButynets opened this issue Jan 16, 2025 · 0 comments · May be fixed by #1141
Open

(SP:) Migration Task: Fix and add resourceType to Quizzes #1140

PavloButynets opened this issue Jan 16, 2025 · 0 comments · May be fixed by #1141
Assignees

Comments

@PavloButynets
Copy link
Contributor

PavloButynets commented Jan 16, 2025

Block #1049

Description

This task involves updating the quizzes collection in the database. Specifically:

  1. Add the resourceType field to documents in the quizzes collection if it does not already exist.
  2. Remove the availability field from the quizzes collection.
  3. Change the resourceType value from quizzes to quiz according to the values ​​in RESOURCES_TYPES_ENUM

Tasks

  1. Analyze Data:

    • Ensure that adding the resourceType field and removing the availability field from the quizzes collection does not affect dependent functionality.
  2. Update quizzes:

    • For each document in the quizzes collection:
      • Check if the resourceType field exists.
      • If the resourceType field does not exist:
        • Add the field with the appropriate default value (e.g., "quizzes" or other relevant value).
      • Remove the availability field from the document.
      • Change the resourceType value from quizzes to quiz
        image
  3. Testing:

    • Validate that:
      • The resourceType field is added to documents in the quizzes collection where it was missing.
      • The availability field is removed from all documents in the attachments collection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Project Backlog
Development

Successfully merging a pull request may close this issue.

1 participant