Commit Graph

27 Commits

Author SHA1 Message Date
Alexandre Alapetite
be4c942cb3 SQL allow recreating existing user (#2555)
* SQL allow recreating existing user

Taking advantage of https://github.com/FreshRSS/FreshRSS/pull/2554
In a case when FreshRSS data is lost, but database data still intact (in
particular MySQL or PostgreSQL), this patch allows recreating previous
users without error

* Better error retrieval

Especially when error occur during the prepare statement
2019-10-06 00:14:19 +02:00
Alexandre Alapetite
38932ee3bb MySQL entry content MEDIUMBLOB (#2551)
Fix https://github.com/FreshRSS/FreshRSS/issues/2448
2019-10-05 10:37:15 +02:00
Alexandre Alapetite
e3e5954394 PDO refactoring for code simplification (#2522)
* PDO refactor

* Automatic prefix when using the syntax `_tableName`
* Uniformity: MySQL is now PDO::ATTR_EMULATE_PREPARES = false just like SQLite and PostgreSQL, with consequences such as only one statement per query
* Use PDO methods exec(), query(), prepare() + execute() in a more efficient way
* Remove auto-update SQL code for versions older than FreshRSS 1.5 (3 years old)
* The name of the default category is set in PHP instead of in the DB (simplies SQL and allows changing the name according to the FreshRSS language)
* Rename `->bd` to `->pdo` (less of a frenshism, and more informative)
* Fix some requests, which were not compatible with MySQL prepared statements

* Whitespace

* Fix syntax for PostgreSQL sequences

+ MySQL install

* Minor formatting

* Fix lastInsertId for PostgreSQL

* Use PHP 5.6+ const

Take advantage of https://github.com/FreshRSS/FreshRSS/pull/2527
https://www.php.net/manual/en/migration56.new-features.php

* A bit of forgotten PHP 5.6 simplification for cURL

* Forgotten $s

* Mini fix custom user config

https://github.com/FreshRSS/FreshRSS/pull/2490/files#r326290346

* More work on install.php but not finished

* install.php working

* More cleaning of PDO in install

* Even more simplification

Take advantage of PDO->exec() to run multiple statements

* Disallow changing the name of the default category

https://github.com/FreshRSS/FreshRSS/pull/2522#discussion_r326967724
2019-09-29 16:22:50 +02:00
Marien Fressinaud
7b4cd3abae add: Allow admins to configure default feeds (#2515)
* Homogenize SQL_INSERT_FEEDS across database types

* Extract default feeds into system configuration

* Adapt default feeds init during installation
2019-09-11 18:40:17 +02:00
Alexandre Alapetite
307e6995fe MySQL GUID case sensitive (#2078)
* MySQL GUID case sensitive

latin1_bin
https://github.com/FreshRSS/FreshRSS/issues/2077

* Prepare update for existing bases

* Perform DB update during actualize

* Reduce frequency slightly

* No optimize at the same time

* Take advantage of the SQL modifications in 1.12

* Move higher up

* Move to purge, which all users can manually call
2018-10-25 22:43:13 +02:00
Alexandre Alapetite
6a686daafa Allow dot in username (#2062)
* Allow dot in username

https://github.com/FreshRSS/FreshRSS/issues/2061

* Missing quotes for special chars in PostgreSQL
2018-10-24 13:07:39 +02:00
Alexandre Alapetite
c8b54ae807 Fix MySQL create table feeds (#2047)
https://github.com/FreshRSS/FreshRSS/issues/2042
2018-10-14 13:48:59 +02:00
Alexandre Alapetite
8ee8a573f1 Custom labels (#2027)
* First draft of custom tags

https://github.com/FreshRSS/FreshRSS/issues/928
https://github.com/FreshRSS/FreshRSS/issues/1367

* SMALLINT to BIGINT for id_entry

And uppercase SQL types

* Fix layout for unreads

* Start UI menu

* Change menu order

* Clean database helpers

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535

* Travis rules do not understand PostgreSQL constants

Grrr

* Tag controller + UI

* Add column attributes to tags

* Use only favicon for now, for label

* Fix styling for different themes

* Constant for maximum InnoDB index length in Unicode

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200
(I would have personnally prefered keeping the readability of a real
value instead of a constant, in this case of many SQL fields)

* Use FreshRSS_Factory::createCategoryDao

* Add view of all articles containing any tag

* Fix search in tags

* Mark as read tags

* Partial auto-update unread tags

* More auto update tag unreads

* Add tag deletion

* Do not purge tagged articles

* Minor comment

* Fix SQLite and UI bug

* Google Reader API support for user tags

Add SQL check that tag names must be distinct from category names

* whitespace

* Add missing API for EasyRSS

* Compatibility SQLite

Problematic parentheses

* Add SQL DISTINCT for cases with multiple tags

* Fix for PostgreSQL

PostgreSQL needs some additional type hint to avoid "could not determine
data type of parameter $1"

http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2018-09-29 20:47:17 +02:00
Alexandre Alapetite
b552abb332 JSON column for feeds (#1838)
* Draft of JSON column for feeds
https://github.com/FreshRSS/FreshRSS/issues/1654

* Add some per-feed options
  * Feed cURL timeout
  * Mark updated articles as read https://github.com/FreshRSS/FreshRSS/issues/891
  * Mark as read upon reception https://github.com/FreshRSS/FreshRSS/issues/1702
  * Ignore SSL (unsafe) https://github.com/FreshRSS/FreshRSS/issues/1811

* Try PHPCS workaround
While waiting for a better syntax support
2018-05-01 17:02:11 +02:00
Alexis Degrugillier
8c2113f9e6 Add mute strategy configuration (#1750) 2018-01-01 20:34:06 +01:00
Alexandre Alapetite
5d54e47ff4 Fix DROP tables for deferred insertion
https://github.com/FreshRSS/FreshRSS/pull/1470
2017-04-10 00:43:18 +02:00
Alexandre Alapetite
bc580c5905 SQL index auto added
At the same time as the new temp table
2017-03-26 22:08:17 +02:00
Alexandre Alapetite
e956aee53d More defered insertion. New SQL index
New index entry_feed_read_index
TODO: Auto add this index to existing version
2017-03-26 14:07:06 +02:00
Alexandre Alapetite
a20fd9db9f Defered insertion MySQL bug
The update of cached values remains to be optimized
2017-03-26 01:41:08 +01:00
Alexandre Alapetite
22b41f3bfc Candidate implementation of defered insertion
https://github.com/FreshRSS/FreshRSS/issues/530
2017-03-26 00:01:11 +01:00
Alexandre Alapetite
1182129ce5 CLI option no-default-feeds
https://github.com/FreshRSS/FreshRSS/issues/1095
2016-10-24 20:29:08 +02:00
Alexandre Alapetite
34e38e3a97 SQL DROP TABLE
https://github.com/FreshRSS/FreshRSS/issues/1320
2016-10-15 20:01:48 +02:00
Alexandre Alapetite
7c1b5e322c PostgreSQL draft
https://github.com/FreshRSS/FreshRSS/issues/416
Based on @Damstre work https://github.com/FreshRSS/FreshRSS/pull/1071
Not tested
2016-08-02 22:49:35 +02:00
Alexandre Alapetite
2859eff94d MySQL UTF8MB4 minor details 2016-08-01 17:52:21 +02:00
Alexandre Alapetite
fe18d12551 Update MySQL to utf8mb4 (full unicode) 🔥
* Requires MySQL 5.5.3+ (drop support for MySQL 5.0)
* Requires PHP 5.3.3+ (drop support for PHP 5.3.0)
https://github.com/FreshRSS/FreshRSS/issues/789#issuecomment-73878076
2016-07-30 18:45:34 +02:00
Alexandre Alapetite
9f0b8ce70d Add default feeds
https://github.com/FreshRSS/FreshRSS/issues/859
2015-07-03 23:29:46 +02:00
Alexandre Alapetite
96ba71e618 MySQL create table bug
https://github.com/FreshRSS/FreshRSS/issues/845
And updated version comments to 1.1.1
2015-05-31 20:22:27 +02:00
Alexandre Alapetite
217c191a1b More SQLite compatibility
Additional changes to add compatibility with SQLite for the new
hash/lastSeen mode of updating articles.
2015-05-11 22:42:41 +02:00
Alexandre Alapetite
711530a512 SQL: detection of updates, and preparation for better burge
https://github.com/FreshRSS/FreshRSS/issues/798
https://github.com/FreshRSS/FreshRSS/issues/493
SQLite not yet tested. Only MySQL tested so far.
2015-04-04 22:39:31 +02:00
Marien Fressinaud
7080a32650 Add checking installation feature 2014-10-20 11:54:31 +02:00
Alexandre Alapetite
1b43167fb8 SQL: Add f.ttl column to control feed cache duration
Preparation of https://github.com/marienfressinaud/FreshRSS/issues/250
Will also be used to disable automatic update for selected feeds
2014-07-05 01:20:45 +02:00
Alexandre Alapetite
d6f4141086 Preparation for SQLite
https://github.com/marienfressinaud/FreshRSS/issues/100
2014-07-03 21:26:30 +02:00