TagDAOSQLite.php 511 B

1234567891011121314151617181920
  1. <?php
  2. class FreshRSS_TagDAOSQLite extends FreshRSS_TagDAO {
  3. public function sqlIgnore(): string {
  4. return 'OR IGNORE';
  5. }
  6. /** @param array<string> $errorInfo */
  7. protected function autoUpdateDb(array $errorInfo): bool {
  8. if ($tableInfo = $this->pdo->query("SELECT sql FROM sqlite_master where name='tag'")) {
  9. $showCreate = $tableInfo->fetchColumn();
  10. if (is_string($showCreate) && stripos($showCreate, 'tag') === false) {
  11. return $this->createTagTable(); //v1.12.0
  12. }
  13. }
  14. return false;
  15. }
  16. }