mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-01-23 04:38:01 -05:00
19 lines
496 B
PHP
19 lines
496 B
PHP
<?php
|
|
|
|
class FreshRSS_CategoryDAOSQLite extends FreshRSS_CategoryDAO {
|
|
|
|
/** @param array<string> $errorInfo */
|
|
protected function autoUpdateDb(array $errorInfo): bool {
|
|
if ($tableInfo = $this->pdo->query("PRAGMA table_info('category')")) {
|
|
$columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1);
|
|
foreach (['kind', 'lastUpdate', 'error', 'attributes'] as $column) {
|
|
if (!in_array($column, $columns, true)) {
|
|
return $this->addColumn($column);
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
}
|