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

Store a PlaylistDelta each time we take a snapshot #111

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

hebron-george
Copy link
Collaborator

Every time a new snapshot is taken, that means there was a diff in the playlist.
So let's store that delta in a PlaylistDelta model so that we can display the playlist history timeline from it instead of recomputing it each time.

…stSnapshot records because they have foreign keys in PlaylistDelta that would need a 'dependent: :destroy' set up in order to be able to destroy the records; I don't want to put that destroy into production in case I accidentally delete a tracked playlist or snapshot in prod - and the test passes with the clean up anyway so I'm not sure why I had it in the first place. I was probably worried about some kind of test pollution
@hebron-george hebron-george merged commit 75cfcbf into master Nov 7, 2024
2 checks passed
@hebron-george hebron-george deleted the playlist_deltas branch November 7, 2024 02:46
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