summaryrefslogtreecommitdiff
path: root/app/Models/EntryDAOPGSQL.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/Models/EntryDAOPGSQL.php')
-rw-r--r--app/Models/EntryDAOPGSQL.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/Models/EntryDAOPGSQL.php b/app/Models/EntryDAOPGSQL.php
index f09fe8e75..aef258b6f 100644
--- a/app/Models/EntryDAOPGSQL.php
+++ b/app/Models/EntryDAOPGSQL.php
@@ -12,8 +12,13 @@ class FreshRSS_EntryDAOPGSQL extends FreshRSS_EntryDAOSQLite {
protected function autoUpdateDb($errorInfo) {
if (isset($errorInfo[0])) {
- if ($errorInfo[0] === '42P01' && stripos($errorInfo[2], 'entrytmp') !== false) { //undefined_table
- return $this->createEntryTempTable();
+ if ($errorInfo[0] === FreshRSS_DatabaseDAOPGSQL::UNDEFINED_TABLE) {
+ if (stripos($errorInfo[2], 'tag') !== false) {
+ $tagDAO = FreshRSS_Factory::createTagDao();
+ return $tagDAO->createTagTable(); //v1.12.0
+ } elseif (stripos($errorInfo[2], 'entrytmp') !== false) {
+ return $this->createEntryTempTable(); //v1.7.0
+ }
}
}
return false;