diff options
| author | 2015-05-11 22:47:13 +0200 | |
|---|---|---|
| committer | 2015-05-11 22:47:13 +0200 | |
| commit | 8b27128a629ee6b36d2469663f69b6023992cf39 (patch) | |
| tree | bd4f4fb37500267c51d91218da62623a6437222d /app/Models/EntryDAOSQLite.php | |
| parent | 0b81d0cbbaa670bc9da5520916e12c19775732ee (diff) | |
| parent | 217c191a1ba3ac03b847d261a32e19975380fcad (diff) | |
Merge remote-tracking branch 'origin/sqliteBug' into dev
Diffstat (limited to 'app/Models/EntryDAOSQLite.php')
| -rw-r--r-- | app/Models/EntryDAOSQLite.php | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/Models/EntryDAOSQLite.php b/app/Models/EntryDAOSQLite.php index ffe0f037c..ff049d813 100644 --- a/app/Models/EntryDAOSQLite.php +++ b/app/Models/EntryDAOSQLite.php @@ -2,6 +2,21 @@ class FreshRSS_EntryDAOSQLite extends FreshRSS_EntryDAO { + protected function autoAddColumn($errorInfo) { + if (empty($errorInfo[0]) || $errorInfo[0] == '42S22') { //ER_BAD_FIELD_ERROR + if ($tableInfo = $this->bd->query("SELECT sql FROM sqlite_master where name='entry'")) { + $showCreate = $tableInfo->fetchColumn(); + Minz_Log::debug('FreshRSS_EntryDAOSQLite::autoAddColumn: ' . $showCreate); + foreach (array('lastSeen', 'hash') as $column) { + if (stripos($showCreate, $column) === false) { + return $this->addColumn($column); + } + } + } + } + return false; + } + protected function sqlConcat($s1, $s2) { return $s1 . '||' . $s2; } |
