Commit graph

59 commits

Author SHA1 Message Date
38bdde1167 Add access tokens to the db, with relevant code
Tokens are similar to sessions in that they stand in for users, but the
protocol handlers will manage them; Fever login hashes are the
originating use case for them. These must never expire, for example,
and we need to specify their values.

This commit also performs a bit of database clean-up
2019-03-09 16:23:56 -05:00
ed22090e49 Work around various SQLite-related problems
- WAL mode was not getting set properly
- Queries using the PDO driver could fail because PDO sucks
2019-03-04 11:05:46 -05:00
fb1bdbfb37 Database schema for subscription tags 2019-03-03 12:10:18 -05:00
05aadfe7c7 Use correct SQLite chema change procedure; version bump 2019-01-21 10:40:39 -05:00
393b4e95ad Adjustments for MySQL 8
The prototype had been tested against MariaDB
2018-12-20 20:50:56 -05:00
316ba941a2 Hopefully complete MySQL schema 2018-12-15 11:09:46 -05:00
86c16d3cb3 Merge branch 'master' into mysql 2018-12-15 09:22:47 -05:00
50f92625ef Use PosgreSQL's existing general Unicode collation
All collations appear to be case-insensitive
2018-12-14 09:18:56 -05:00
0f48ce6f37 Use a Unicode collation for SQLite 2018-12-11 14:14:32 -05:00
8fc31cfc40 Rewrite various queries to work in PostgreSQL
This involved changes to the driver interface as well as the database
schemata. The most significantly altered queries were for article
selection and marking, which relied upon unusual features of SQLite.
Overall query efficiency should not be adversely affected (it may have
even imprved) in the common case, while very rare cases (not presently
triggered by any REST handlers) require more queries.

One notable benefit of these changes is that functions which query
articles can now have complete control over which columns are returned.
This has not, however, been implemented yet: symbolic column groups are
still used for now.

Note that PostgreSQL still fails many tests, but the test suite runs to
completion. Note also that one line of the Database class is not
covered; later changes will eventually make it easier to cover the line
in question.
2018-12-04 20:41:21 -05:00
0f7baf4b51 Base MySQL schema
Note the columns "key" and "read" must be quoted in addition to "user".
2018-11-28 14:00:36 -05:00
10b228224d Correct PostgreSQL data format and other tweaks 2018-11-28 12:12:49 -05:00
d0db784b22 PostgreSQL schema tweak 2018-11-27 17:50:38 -05:00
dccd4caede Convert one database function test series (articles) to a common harness
Also revert the dropping of tables in the schema files. This was for the
convenience of tests, but the risk of data loss is too great
2018-11-24 23:18:17 -05:00
36c5984c47 Add drop statements to database schemata to simplify testing 2018-11-23 12:53:56 -05:00
c0c4810662 Nominally complete PostgreSQL driver
Connection error handling as well as uprade error handling still need
to be implemented.
2018-11-21 11:06:12 -05:00
f64f0c6a22 Whitespace cleanup 2018-10-26 14:58:04 -04:00
4b46d654bb Replace SQLite is with SQL = for consistency 2017-12-19 17:19:05 -05:00
0b3b3cb49c Use SQLite nocase collation; improves #127 2017-12-07 18:05:34 -05:00
821bb22a72 SQLite concurrency tweaks; fixes #131 2017-12-01 16:37:58 -05:00
6da86428c4 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:51:03 -05:00
11b2066922 Added per-file legal boilerplate
Includes PHPDoc license tag in the file-level block with accompanying copyright notice.

Also added an AUTHORS file on the off chance of outside contributions
2017-11-16 20:23:18 -05:00
ea986f5032 Implement TTRSS operation updateArticle; fixes #83
This required adding the "notes" column to the arsse_marks table and adding same as a target value in Database::articleMark()

The Context class was also adjusted to remove the possibility of false positives in some tests
2017-11-09 14:21:12 -05:00
2e395f3cec Complete backend support for labels 2017-10-13 00:04:26 -04:00
26f6922b25 Partially implement labels
- Backend functions for adding, listing, removing, and editing (renaming) labels currently implemented
- TTRSS functions for adding (fixes #96), removing (fixes #97), and renaming (fixes #98) labels currently implemented
2017-10-05 17:42:12 -04:00
91432d4e16 Tests for sessions 2017-09-24 12:45:07 -04:00
474d32e54f Preliminary implementation of TTRSS sessions (needs tests; may not work) 2017-09-16 19:57:33 -04:00
67203679aa Changed foreign key on marks table
Previously arsse_marks had a reference to arsse_users along with arsse_articles; the former has now changed to arsse_subscriptions.

Consequently deleting a subscription now deletes marks. Tests have been simplified as a consequence.

This change was understaken to simplify counting valid marks on articles for the purposes of article cleanup; now all marks are valid marks
2017-08-14 17:18:18 -04:00
3b018c89d1 Implemented cleanup of orphaned feeds; fixes #25 2017-08-02 18:27:04 -04:00
aaa4d1e988 Basic support for PicoFeed content scraping
- At the moment this is a completely manual setting: feed deduplication makes the setting very hard to handle for multiple users
- Improves #60
2017-07-17 14:56:50 -04:00
d4674c61b2 More bug fixes
- use DateFormatter throughout the Feed class
- Ensure dates have TEXT affinity in SQLite, in case it matters
- Add a userPreAuth setting for when relying on the Web server to do authentication
2017-07-15 13:33:17 -04:00
387b40829b Tweaks 2017-07-11 09:15:44 -04:00
7e7b204d85 Cleanup
- Revamped design of Query class to be more consistent and predictable, and generally suck less
- Removed special case for Query class in Statement class
- Cleaned up database schema somewhat
2017-07-07 11:49:54 -04:00
c6b7e653c5 Tests for feedUpdate and feedListStale
The update process neglects to handle enclosures; this will have to be fixed
2017-06-02 19:16:36 -04:00
ba6b5dee85 Simplify in-database settings
The previous complexity is really not required. Also modified how settingSet() works to avoid a REPLACE query, which is not compatible with PostgreSQL.
2017-06-01 16:24:11 -04:00
4a816f827b NCNv1 feed calls and other changes
- Implemented all but one feed-related function (it's more ofan item function)
- Fixed time conversion for input into SQL; dates in PM were previously wrong
- Added miscellaneous tentative functions to Database to help with peculiarities of NCNv1; these may change
- Tests to come soon
2017-05-18 23:03:33 -04:00
99ae274ef8 Also test negative read marks 2017-05-16 22:24:36 -04:00
ef3cb4fa54 Test unread counts in subscriptionList 2017-05-16 22:19:40 -04:00
119d42907e More feed update refactoring
Still very much incomplete: in its present form it would yield many false duplicates
2017-04-15 22:07:22 -04:00
4e57e56ca7 Start on refactoring of feed processing 2017-04-13 22:17:53 -04:00
1e1b848c62 Remove root field from folders table
The field is no longer required with the use of recursive common table expressions, and  presents a possible loss of referential integrity
2017-04-01 14:49:31 -04:00
a111bcc231 Folder get/set prop funcs and other changes
- Simplified folder removal; now properly relies on foreign keys for dependency resolution
- simplified *propertiesSet() methods by offloading input validation and query building to a generic function
- Implemented function to get the properties of a single folder (useful for internal use)
- Implemented a function to set the properties of a folder
2017-04-01 10:27:26 -04:00
b68cea1188 Tests for adding folders 2017-03-31 15:27:59 -04:00
bc863ae935 Updated Database->updateFeeds()
• Added category updating in Database->updateFeeds()
• Made Database->updateFeeds() fail quietly when exceptions are
occurred, logging them in the database instead of failing.
• Changed the categories table name from arsse_tags to arsse_categories.
2017-03-30 09:42:37 -05:00
7236020b8b Changed "NewsSync" to "Arsse" 2017-03-27 23:12:12 -05:00
b8f9b6070e Experimental method to remove a folder 2017-03-27 08:39:24 -04:00
ce0584e7f8 Added Feed Updating
• Started implementing feed updating (Database->updateFeeds())
• Moved hashing to the Feed object, now done when parsing
• Moved adding of articles to the database to its own method
(Database->articleAdd())
2017-03-26 15:16:15 -05:00
536fa5c4fd Implement NextCloud News version detection
- Improves #47
- Still needs wrapping to actually output to clients
2017-03-19 21:50:00 -04:00
3f61921b97 Added picoFeed wrapper
• Implemented a simple wrapper for picoFeed which fixes the id problems
and keeps error handling within its own class
• Updated Database.php to use the new class
• Replaced mentions of ownCloud with NextCloud in the schema
• Added hashes to schema for identification and change detection;
removed NextCloud hash and fingerprint; removed enclosure and category
hashes
2017-03-18 11:01:23 -05:00
8c268581fb Properly handle adding a folder
Also added test file for now
2017-03-09 22:41:11 -05:00