bloom-backend
bloom-backend copied to clipboard
Create Deleted At Column in the database and back fill user data
Overview
When a user requests to be deleted, we soft delete them and hash their personal details. If we want to find a list of dates users were deleted, we can guess when the user was deleted by seeing if the user is set as user.active
=false and take the date in the updatedAt
column. However, we would prefer for this data to have its own column. We want to also add a nullable column to the user called "deletedAt" so we can have the date of when the user was deleted for monitoring purposes. We also want to backfill the data
Action Items
- [ ] Create the deletedAt column on the user table
- [ ] Write a migration which sets the
uesr.deletedAt
column to the date ofuser.updatedAt
where theuser.active
is set to false - [ ] Create a PR and tag @eleanorreem and @annarhughes as reviewers