v2.4.4: DatabaseEntity migration and bugfixes

This commit is contained in:
2024-05-21 12:32:44 +02:00
parent b96d0d053c
commit 037f0fae91
14 changed files with 249 additions and 47 deletions

View File

@@ -62,7 +62,14 @@ class Settings {
}
public static function getAll(?SQL $sql, ?string $pattern = null, bool $external = false): ?array {
$query = $sql->select("name", "value")->from("Settings");
// We do not have a Settings table yet, we might still be in installation phase
if (!$sql->tableExists("Settings")) {
return null;
}
$query = $sql->select("name", "value")
->from("Settings");
if ($pattern) {
$query->where(new CondRegex(new Column("name"), $pattern));