From 387de940fffd20e4febf05f217607207e74e95c1 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 8 Jun 2022 22:36:06 -0400 Subject: [PATCH] Start on update test --- tests/cases/Db/BaseUpdate.php | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/tests/cases/Db/BaseUpdate.php b/tests/cases/Db/BaseUpdate.php index 58877b21..bcf93d5f 100644 --- a/tests/cases/Db/BaseUpdate.php +++ b/tests/cases/Db/BaseUpdate.php @@ -202,4 +202,53 @@ QUERY_TEXT ]; $this->compareExpectations($this->drv, $exp); } + + public function testUpdateTo8(): void { + $this->drv->schemaUpdate(7); + $this->drv->exec( + <<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 +) +*/ \ No newline at end of file