1
1
Fork 0
mirror of https://code.mensbeam.com/MensBeam/Arsse.git synced 2024-12-22 13:12:41 +00:00

Add modification timestamps for ownCloud API

This commit is contained in:
J. King 2016-09-24 17:22:01 -04:00
parent b4ad50e492
commit c3bc913240

View file

@ -17,6 +17,7 @@ create table chibi_categories(
parent integer, -- parent category id
folder integer not null, -- first-level category (ownCloud folder)
name TEXT not null, -- category name
modified datetime not null default CURRENT_TIMESTAMP, --
unique(owner,name,parent) -- cannot have multiple categories with the same name under the same parent for the same owner
);
@ -28,11 +29,12 @@ create table chibi_feeds(
favicon TEXT, -- URL of favicon
source TEXT, -- URL of site to which the feed belongs
updated datetime, -- time at which the feed was last fetched
modified datetime not null default CURRENT_TIMESTAMP, --
err_count integer not null default 0, -- count of successive times update resulted in error since last successful update
err_msg TEXT, -- last error message
username TEXT, -- HTTP authentication username
password TEXT, -- HTTP authentication password (this is stored in plain text)
unique(url,username,password) --
unique(url,username,password) -- a URL with particular credentials should only appear once
);
-- users' subscriptions to newsfeeds, with settings
@ -41,10 +43,12 @@ create table chibi_subscriptions(
owner TEXT references users(id) on delete cascade on update cascade, -- owner of subscription
feed integer references feeds(id) on delete cascade, -- feed for the subscription
added datetime not null default CURRENT_TIMESTAMP, -- time at which feed was added
modified datetime not null default CURRENT_TIMESTAMP, -- date at which subscription properties were last modified
title TEXT, -- user-supplied title
order_type int not null default 0, -- ownCloud sort order
pinned boolean not null default 0, -- whether feed is pinned (always sorts at top)
category integer references categories(id) on delete set null -- TT-RSS category (nestable); the first-level category (which acts as ownCloud folder) is joined in when needed
category integer references categories(id) on delete set null, -- TT-RSS category (nestable); the first-level category (which acts as ownCloud folder) is joined in when needed
unique(owner,feed) -- a given feed should only appear once for a given owner
);
-- entries in newsfeeds
@ -58,6 +62,7 @@ create table chibi_articles(
edited datetime, -- time of last edit
guid TEXT, -- GUID
content TEXT, -- content, as (X)HTML
modified datetime not null default CURRENT_TIMESTAMP, -- date when article properties were last modified
hash varchar(64) not null, -- ownCloud hash
fingerprint varchar(64) not null, -- ownCloud fingerprint
enclosures_hash varchar(64), -- hash of enclosures, if any; since enclosures are not uniquely identified, we need to know when they change
@ -66,10 +71,11 @@ create table chibi_articles(
-- users' actions on newsfeed entries
create table chibi_subscription_articles(
id integer primary key,
id integer primary key not null,
article integer references articles(id) on delete cascade,
read boolean not null default 0,
starred boolean not null default 0
starred boolean not null default 0,
modified datetime not null default CURRENT_TIMESTAMP
);
-- enclosures associated with articles