diff options
| author | 2015-11-04 20:26:30 +0100 | |
|---|---|---|
| committer | 2015-11-04 20:26:30 +0100 | |
| commit | 74639cb1535feddb808a4262e058a67d4a3aef6b (patch) | |
| tree | 78c5567578751752a3623574cbd768e602a46754 /app/Models/EntryDAOSQLite.php | |
| parent | 4c99fd689f0778cbf6a987471ebf72b3787739c2 (diff) | |
| parent | 4525e547faa8781e37f86125110f28248eb67fd3 (diff) | |
Merge branch '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; } |
