fix: try db fix
web/docker-ttrss/pipeline/head Build queued...

This commit is contained in:
Julien Cabillot
2026-03-04 16:54:48 -05:00
parent 331669a4f1
commit d1ef59de72
+2 -11
View File
@@ -70,17 +70,8 @@ try {
echo 'Resetting theme to default ...' . PHP_EOL;
$pdo->query("UPDATE ttrss_user_prefs SET value = '' WHERE pref_name = 'USER_CSS_THEME'");
}
}
catch (PDOException $e) {
echo 'Database table not found, applying schema... ' . PHP_EOL;
$schema = file_get_contents($confpath . '/schema/ttrss_schema_' . $config['DB_TYPE'] . '.sql');
$schema = preg_replace('/--(.*?);/', '', $schema);
$schema = preg_replace('/[\r\n]/', ' ', $schema);
$schema = trim($schema, ' ;');
foreach (explode(';', $schema) as $stm) {
$pdo->exec($stm);
}
} catch (PDOException $e) {
echo 'Database table not found, there is no schema anymore lets continue and see what will happen... ' . PHP_EOL;
unset($pdo);
}