mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-10-23 11:38:34 -04:00
INSERT ... ON CONFLIT DO NOTHING for addEntry (#3409)
#fix https://github.com/FreshRSS/FreshRSS/issues/3402 Explicit `INSERT OR IGNORE` / `ON CONFLICT DO NOTHING` for the `addEntry()` method, which does expect some duplicates.
This commit is contained in:
1 parent
8285f1df43
commit
1ee1fcce91
3 files changed
+16
-2
No files matched your search
@@ -14,6 +14,10 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO {
|
||||
return $x;
|
||||
}
|
||||
|
||||
public function sqlIgnoreConflict($sql) {
|
||||
return str_replace('INSERT INTO ', 'INSERT OR IGNORE INTO ', $sql);
|
||||
}
|
||||
|
||||
protected function autoUpdateDb($errorInfo) {
|
||||
if ($tableInfo = $this->pdo->query("SELECT sql FROM sqlite_master where name='tag'")) {
|
||||
$showCreate = $tableInfo->fetchColumn();
|
||||
|
||||
Reference in new issue
Block a user