Files
FreshRSS/app/Models/FeedDAOPGSQL.php
Alexandre Alapetite deb7633c49 Change SQL update query (#6957)
* Change SQL update query for MariaDB / MySQL
fix https://github.com/FreshRSS/FreshRSS/issues/5707

* No change for SQLite

* Fix merge error

* Update MySQL version on the model of PostgreSQL
Performance to be tested

* Fix LEFT JOIN, also for PostgreSQL / SQLite

* Fix alias

* Reduce MySQL deadlock

* Fix compatibility with SQLite

* Back to identical SQL for all databases
2025-11-17 13:48:48 +01:00

14 lines
295 B
PHP

<?php
declare(strict_types=1);
class FreshRSS_FeedDAOPGSQL extends FreshRSS_FeedDAO {
#[\Override]
public function sqlResetSequence(): bool {
$sql = <<<'SQL'
SELECT setval('`_feed_id_seq`', COALESCE(MAX(id), 0) + 1, false) FROM `_feed`
SQL;
return $this->pdo->exec($sql) !== false;
}
}