The clean & modern RSS server that doesn't give you any crap. https://thearsse.com/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1.sql 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. -- SPDX-License-Identifier: MIT
  2. -- Copyright 2017 J. King, Dustin Wilson et al.
  3. -- See LICENSE and AUTHORS files for details
  4. create table arsse_sessions(
  5. -- sessions for Tiny Tiny RSS (and possibly others)
  6. id text primary key, -- UUID of session
  7. created text not null default CURRENT_TIMESTAMP, -- Session start timestamp
  8. expires text not null, -- Time at which session is no longer valid
  9. user text not null references arsse_users(id) on delete cascade on update cascade -- user associated with the session
  10. ) without rowid;
  11. create table arsse_labels(
  12. -- user-defined article labels for Tiny Tiny RSS
  13. id integer primary key, -- numeric ID
  14. owner text not null references arsse_users(id) on delete cascade on update cascade, -- owning user
  15. name text not null, -- label text
  16. modified text not null default CURRENT_TIMESTAMP, -- time at which the label was last modified
  17. unique(owner,name)
  18. );
  19. create table arsse_label_members(
  20. -- uabels assignments for articles
  21. label integer not null references arsse_labels(id) on delete cascade, -- label ID associated to an article; label IDs belong to a user
  22. article integer not null references arsse_articles(id) on delete cascade, -- article associated to a label
  23. subscription integer not null references arsse_subscriptions(id) on delete cascade, -- Subscription is included so that records are deleted when a subscription is removed
  24. assigned boolean not null default 1, -- whether the association is current, to support soft deletion
  25. modified text not null default CURRENT_TIMESTAMP, -- time at which the association was last made or unmade
  26. primary key(label,article) -- only one association of a given label to a given article
  27. ) without rowid;
  28. -- alter marks table to add Tiny Tiny RSS' notes
  29. -- SQLite has limited ALTER TABLE support, so the table must be re-created
  30. -- and its data re-entered; other database systems have a much simpler prodecure
  31. create table arsse_marks_new(
  32. -- users' actions on newsfeed entries
  33. article integer not null references arsse_articles(id) on delete cascade, -- article associated with the marks
  34. subscription integer not null references arsse_subscriptions(id) on delete cascade on update cascade, -- subscription associated with the marks; the subscription in turn belongs to a user
  35. read boolean not null default 0, -- whether the article has been read
  36. starred boolean not null default 0, -- whether the article is starred
  37. modified text not null default CURRENT_TIMESTAMP, -- time at which an article was last modified by a given user
  38. note text not null default '', -- Tiny Tiny RSS freeform user note
  39. primary key(article,subscription) -- no more than one mark-set per article per user
  40. );
  41. insert into arsse_marks_new(article,subscription,read,starred,modified) select article,subscription,read,starred,modified from arsse_marks;
  42. drop table arsse_marks;
  43. alter table arsse_marks_new rename to arsse_marks;
  44. -- set version marker
  45. pragma user_version = 2;
  46. update arsse_meta set value = '2' where key = 'schema_version';