aboutsummaryrefslogtreecommitdiff
path: root/app/Models/CategoryDAOSQLite.php
blob: e32545c90fe18fc37185800f02a094b7b0b320d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<?php

class FreshRSS_CategoryDAOSQLite extends FreshRSS_CategoryDAO {

	protected function autoUpdateDb($errorInfo) {
		if ($tableInfo = $this->pdo->query("PRAGMA table_info('category')")) {
			$columns = $tableInfo->fetchAll(PDO::FETCH_COLUMN, 1);
			foreach (['attributes'] as $column) {
				if (!in_array($column, $columns)) {
					return $this->addColumn($column);
				}
			}
		}
		return false;
	}

}