mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-05-20 09:30:36 +00:00
5e8c964f6c
* Stable IDs during SQL import Follow-up of https://github.com/FreshRSS/FreshRSS/pull/7949 Make sure that the original category IDs, feed IDs, and label IDs are kept identical during an SQL import. Avoid breaking everything referring to categories, feeds, labels by their IDs such as searches and third-party extensions. * Fix export of default category
19 lines
368 B
PHP
19 lines
368 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
class FreshRSS_TagDAOPGSQL extends FreshRSS_TagDAO {
|
|
|
|
#[\Override]
|
|
public function sqlIgnore(): string {
|
|
return ''; //TODO
|
|
}
|
|
|
|
#[\Override]
|
|
public function sqlResetSequence(): bool {
|
|
$sql = <<<'SQL'
|
|
SELECT setval('`_tag_id_seq`', COALESCE(MAX(id), 0) + 1, false) FROM `_tag`
|
|
SQL;
|
|
return $this->pdo->exec($sql) !== false;
|
|
}
|
|
}
|