RealDevSquad / RealDevSquad/website-backend
Migrate User Status Data from Old Structure to New Format in Firestore
Open
@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
usersFutureStatuswith proper fields such asfrom,endsOn, and state.
Current Behavior
- User status is currently updated in place in the
usersStatuscollection, 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.