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

Split Feed model #1207

Open
twm opened this issue Jul 20, 2024 · 0 comments
Open

Split Feed model #1207

twm opened this issue Jul 20, 2024 · 0 comments

Comments

@twm
Copy link
Owner

twm commented Jul 20, 2024

Much like Article in #415, the Feed model mixes server-set and client-set fields. Unlike that issue the primary concern here is lost updates.

Server-set fields

  • url — may be updated
  • next_check, last_checked, last_changed — timestamps
  • error
  • etag, last_modified, digest
  • feed_title, site_url — feed metadata

Client-set fields

  • url — entered by the user
  • created, deleted
  • user_title

Server- and client-set fields

  • all_count
  • unread_count
  • fave_count

Proposed changes

Split into a few models:

Feed

Defines a feed to check. Contains the client-set fields.

The url field contains the URL originally entered by the user.

FeedState

Contains the server-set fields.

The current_url field contains the URL after persisting any permanent redirects.

FeedCounts

Contains all_count, unread_count, and fave_count. Maintained exclusively by triggers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant