podkrepi-bg / api

Nest.js REST backend for charity platform Podkrepi.bg https://podkrepi.bg/swagger
https://podkrepi.bg
MIT License
82 stars 43 forks source link

[BUG]: User not being able to delete his account if it is associated with other parts of the platform. #641

Open sashko9807 opened 3 months ago

sashko9807 commented 3 months ago

Which area(s) of Podkrepi.bg are affected? (leave empty if unsure)

No response

Describe the Bug

Whenever someone's account is associated with other part of the project be it donations, file uploads or info requests or others, user is unable to delete that account due to, foreign key constraint failure.

To Reproduce

  1. Create new account
  2. Make non-anonymous or recurring donation
  3. Attempt to delete the account

The same example holds true, for other every other table which uses personId as foreign key.

Expected Behavior

User should be able to delete his account regardless of its association with other parts of the projects. For that to happen, we should first strategize on what will happen to the existing records referencing that person for each table.

Which browser are you using? (if relevant)

No response