Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove orphaned tracks and channels on user delete #22

Merged
merged 3 commits into from
May 11, 2024
Merged

Conversation

oskarrough
Copy link
Contributor

This replaces the already existing delete_user() function.

It will now also

  • explicitly delete the account
  • delete any orphaned channels or tracks when delete_user() is called

If you delete a channel, but not your user, tracks are still not removed, since they might be referenced by other channel_tracks. BUT, on the next delete_user() call it'll be cleaned up.


As an alternative to this approach, we could disable the multi-channel/track schema for now. Add user_id to channels and channel_id to tracks. Then we can clean it up easy with SQL cascades, and don't need this stuff.

@oskarrough oskarrough closed this May 11, 2024
@oskarrough oskarrough reopened this May 11, 2024
@oskarrough oskarrough merged commit b360c48 into main May 11, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant