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

Migration to create a file_downloads table #1343

Merged
merged 2 commits into from
Dec 19, 2024
Merged

Conversation

moveson
Copy link
Collaborator

@moveson moveson commented Dec 19, 2024

This PR creates a file_downloads table to track user downloads of ActiveStorage files.

It would have been nice to reference the ActiveStorage::Attachment record for each download, as that would have reduced the amount of duplication this table will otherwise contain. But ActiveStorage::Attachment records are deleted when the related file is purged, so the relations would not have been guaranteed to exist.

@moveson moveson merged commit 56df2c4 into master Dec 19, 2024
2 of 3 checks passed
@moveson moveson deleted the oveson/file-downloads-table branch December 19, 2024 00:51
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