diff options
| author | 2015-05-30 20:46:41 +0200 | |
|---|---|---|
| committer | 2015-05-30 20:46:41 +0200 | |
| commit | 185dba88c1da23f3fa4e787635e42fd81002b2cc (patch) | |
| tree | 8122644648450a7722b617a0d106bca4d1106d95 /app/Models/EntryDAOSQLite.php | |
| parent | ca58a265e6a702e42e25f5bf2393896b5517b0be (diff) | |
| parent | 00e00849815f35ab3e3a1da2cbfa515f4bace392 (diff) | |
Merge 1.1.1-dev into /beta
https://github.com/FreshRSS/FreshRSS/issues/845
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; } |
