leepeuker / movary

Self hosted web app to track and rate your watched movies
MIT License
388 stars 14 forks source link

User data is not deleted when a user is removed #557

Closed muhammad-ans closed 8 months ago

muhammad-ans commented 8 months ago

Description

If we create a 2nd user and delete it the watched data would be still there and would be assigned to the next user created as id of 2nd user would assigned to new user.

Version

nightly

Steps to Reproduce

  1. Create a 2nd user.
  2. add some movies as watched
  3. delete the user
  4. create new user
  5. Deleted users history would be assigned to new user.

Screenshots

No response

Logs

No response

Server OS

Fedora Silverblue 39

Client Platform

None

Client Device

No response

Client OS

No response

Client Browser

No response

Additional Context

No response

leepeuker commented 8 months ago

Which database are you using?

leepeuker commented 8 months ago

I assume you are using SQLite, I just noticed that the foreign key support was not enabled, so the automatic cleanup of orphaned data entries was not happing. This should now be fixed

muhammad-ans commented 8 months ago

Yes, was using sqlite.