RealDevSquad / RealDevSquad/website-backend

Migrate User Status Data from Old Structure to New Format in Firestore

Open
#2,135 0 comments 0 reactions 1 assignee View on GitHub

@sahsisunny is already working on this.

Since Sep 15, 2024.

Dominant language
JavaScript
Stars
74
Forks
276
Avg merge
1d 26m
Merged PRs (30d)
14

Description

Issue Description

We need to migrate existing user status data from the old structure in usersStatus to the newly proposed structure, which separates user status into usersStatus and usersFutureStatus collections. The goal is to ensure that all past, current, and future statuses are correctly represented in the new system.

Expected Behavior
  • All old user status data should be migrated.
  • The new structure will store past, current, and future statuses separately, allowing us to track historical events.
  • Future statuses will be stored in usersFutureStatus with proper fields such as from, endsOn, and state.
Current Behavior
  • User status is currently updated in place in the usersStatus collection, overwriting past statuses.
  • Future statuses are stored within the same document, and events are not logged.
  • The current system does not handle status transitions, such as applying future statuses automatically.
Severity/Priority
  • Critical
  • High
  • Medium
  • Low
Checklist
  • I have read and followed the project's code of conduct.
  • I have searched for similar issues before creating this one.
  • I have provided all the necessary information to understand and reproduce the issue.
  • I am willing to contribute to the resolution of this issue.
Additional Info

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.