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

Add a Subscribable concern #287

Open
gravitystorm opened this issue Feb 25, 2024 · 0 comments
Open

Add a Subscribable concern #287

gravitystorm opened this issue Feb 25, 2024 · 0 comments

Comments

@gravitystorm
Copy link
Owner

We should be able to refactor Changesets, Diary Entries (and potentially nodes) to share code as a concern - e.g. so that Changeset.subscribe(user), DiaryEntry.subscribe(user), Note.subscribe(user) are all implemented in the same manner.

An interesting topic here is whether we should have a polymorphic subscriptions model/table, rather than separate tables for each type of subscription. They will all just be object_id, user_id and nothing else, but if we wanted to change one (e.g. to add t.timestamps) then we would want to do the same to all of them. That suggests to me that a polymorphic table might be better, albeit hard to retrofit.

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

No branches or pull requests

1 participant