-- allow marks to initially have a null date due to changes in how marks are first created
-- and also add a "touched" column to aid in tracking changes during the course of some transactions
altertablearsse_marksrenametoarsse_marks_old;
createtablearsse_marks(
-- 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