mirror of https://github.com/FreshRSS/FreshRSS.git
20 lines
503 B
PHP
20 lines
503 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
class FreshRSS_FeedDAOSQLite extends FreshRSS_FeedDAO {
|
|
|
|
/** @param array<int|string> $errorInfo */
|
|
#[\Override]
|
|
protected function autoUpdateDb(array $errorInfo): bool {
|
|
if ($tableInfo = $this->pdo->query("PRAGMA table_info('feed')")) {
|
|
$columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1);
|
|
foreach (['attributes', 'kind'] as $column) {
|
|
if (!in_array($column, $columns, true)) {
|
|
return $this->addColumn($column);
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
}
|