|
|
@ -202,4 +202,53 @@ QUERY_TEXT |
|
|
|
]; |
|
|
|
$this->compareExpectations($this->drv, $exp); |
|
|
|
} |
|
|
|
|
|
|
|
public function testUpdateTo8(): void { |
|
|
|
$this->drv->schemaUpdate(7); |
|
|
|
$this->drv->exec( |
|
|
|
<<<QUERY_TEXT |
|
|
|
INSERT INTO arsse_users values |
|
|
|
('a', 'xyz', 1, 0), |
|
|
|
('b', 'abc', 2, 0), |
|
|
|
('c', 'gfy', 5, 1); |
|
|
|
INSERT INTO arsse_feeds values |
|
|
|
(1, 'https://example.com/rss', 'Title 1', 'https://example.com/', '2001-06-13 06:55:23', '2001-06-13 06:56:23', '2001-06-13 06:57:23', '2001-06-13 06:54:23', '"ook"', 42, 'Some error', 'johndoe', 'secret', 47, null); |
|
|
|
QUERY_TEXT |
|
|
|
); |
|
|
|
$this->drv->schemaUpdate(8); |
|
|
|
$exp = [ |
|
|
|
'arsse_users' => [ |
|
|
|
'columns' => ["id", "password", "num", "admin"], |
|
|
|
'rows' => [ |
|
|
|
["a", "xyz", 1, 0], |
|
|
|
["b", "abc", 2, 0], |
|
|
|
["c", "gfy", 5, 1], |
|
|
|
] |
|
|
|
] |
|
|
|
]; |
|
|
|
$this->compareExpectations($this->drv, $exp); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
CREATE TABLE "arsse_feeds"( |
|
|
|
-- newsfeeds, deduplicated |
|
|
|
-- users have subscriptions to these feeds in another table |
|
|
|
id integer primary key, -- sequence number |
|
|
|
url text not null, -- URL of feed |
|
|
|
title text collate nocase, -- default title of feed (users can set the title of their subscription to the feed) |
|
|
|
source text, -- URL of site to which the feed belongs |
|
|
|
updated text, -- time at which the feed was last fetched |
|
|
|
modified text, -- time at which the feed last actually changed |
|
|
|
next_fetch text, -- time at which the feed should next be fetched |
|
|
|
orphaned text, -- time at which the feed last had no subscriptions |
|
|
|
etag text not null default '', -- HTTP ETag hash used for cache validation, changes each time the content changes |
|
|
|
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 not null default '', -- HTTP authentication username |
|
|
|
password text not null default '', -- HTTP authentication password (this is stored in plain text) |
|
|
|
size integer not null default 0, -- number of articles in the feed at last fetch |
|
|
|
icon integer references arsse_icons(id) on delete set null, -- numeric identifier of any associated icon |
|
|
|
unique(url,username,password) -- a URL with particular credentials should only appear once |
|
|
|
) |
|
|
|
*/ |