-- use WITHOUT ROWID tables when possible; this is an SQLite-specific change
createtablearsse_meta_new(
-- application metadata
keytextprimarykeynotnull,-- metadata key
valuetext-- metadata value, serialized as a string
)withoutrowid;
insertintoarsse_meta_newselect*fromarsse_meta;
droptablearsse_meta;
altertablearsse_meta_newrenametoarsse_meta;
createtablearsse_marks_new(
-- users' actions on newsfeed entries
articleintegernotnullreferencesarsse_articles(id)ondeletecascade,-- article associated with the marks
subscriptionintegernotnullreferencesarsse_subscriptions(id)ondeletecascadeonupdatecascade,-- subscription associated with the marks; the subscription in turn belongs to a user
readbooleannotnulldefault0,-- whether the article has been read
starredbooleannotnulldefault0,-- whether the article is starred
modifiedtext,-- time at which an article was last modified by a given user
notetextnotnulldefault'',-- Tiny Tiny RSS freeform user note
touchedbooleannotnulldefault0,-- used to indicate a record has been modified during the course of some transactions
primarykey(article,subscription)-- no more than one mark-set per article per user