bloom-backend icon indicating copy to clipboard operation
bloom-backend copied to clipboard

Create Deleted At Column in the database and back fill user data

Open eleanorreem opened this issue 7 months ago • 7 comments

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 of user.updatedAt where the user.active is set to false
  • [ ] Create a PR and tag @eleanorreem and @annarhughes as reviewers

eleanorreem avatar Jul 18 '24 10:07 eleanorreem