Feature/one time user colors
This is a one-time PR
Issue Ticket Number:- #712 API Contract: - API contract https://github.com/Real-Dev-Squad/website-api-contracts/pull/147 Frontend PR: https://github.com/Real-Dev-Squad/website-members/pull/396
Backend changes
- [x] Yes
- [ ] No
Frontend Changes
- [ ] Yes
- [x] No
Database changes
- [x] Yes
- [ ] No
Breaking changes (If your feature is breaking/missing something please mention pending tickets)
- [ ] Yes
- [x] No
Deployment notes None
Description
- This
PRwill add a colors id for each user which will then be used on frontend for users to see their profile is a specific color.
Testing Stats:
file: controllers/userMigrations.js
file: models/userMigrations.js
file utils/helpers.js
Other than the 2 comments above, everything looks good to me. We can proceed with merging after those are resolved. Thanks for the PR.
Can you also update the API Contracts and Data Model as well in the ticket.
yes added
we are modifying user resource here ideally this route should be in users.
this was discussed with @pallabez , again the discussion took place long time ago and it was decided to use this route for migrations. It is a one time PR so the code will not exist after this. Let me know what should be done here
we are modifying user resource here ideally this route should be in users.
this was discussed with @pallabez , again the discussion took place long time ago and it was decided to use this route for migrations. It is a one time PR so the code will not exist after this. Let me know what should be done here
so do you mean that for new users this random color constant are being added. only for the old users this is a 1 time fix ?
we are modifying user resource here ideally this route should be in users.
this was discussed with @pallabez , again the discussion took place long time ago and it was decided to use this route for migrations. It is a one time PR so the code will not exist after this. Let me know what should be done here
so do you mean that for new users this random color constant are being added. only for the old users this is a 1 time fix ?
this will only be for existing users, I am not sure if a new user signs up we are adding them a color property, we can also have a follow up PR for that
we are modifying user resource here ideally this route should be in users.
this was discussed with @pallabez , again the discussion took place long time ago and it was decided to use this route for migrations. It is a one time PR so the code will not exist after this. Let me know what should be done here
so do you mean that for new users this random color constant are being added. only for the old users this is a 1 time fix ?
this will only be for existing users, I am not sure if a new user signs up we are adding them a color property, we can also have a follow up
PRfor that
In this scenario, it seems more logical to write that part initially otherwise, the current script will function for all the current users, but the color property will be missing for new users and the super user will need to run this every time new users are added in the DB. Alternatively, if we add it for new users first, then we can ensure that everyone is covered. Once the script is executed, we can then remove the script for once and for all. What do you think @vivek-geekyants @isVivek99
Just noticed model tests are missing 👀
will be updating
yes will raise a seperate PR for that, lets not stop this PR being approved for that.