manage sqlite database in databases folder

This commit is contained in:
2023-11-12 18:32:39 +01:00
parent 04e2843569
commit 13baf7660c

View File

@@ -66,6 +66,13 @@ class Application
$conn["PASSWORD"] = isset($_ENV[$this->getKey("PASSWORD", $key)]) ? $_ENV[$this->getKey("PASSWORD", $key)] : null;
$conn["DATABASE"] = isset($_ENV[$this->getKey("DATABASE", $key)]) ? $_ENV[$this->getKey("DATABASE", $key)] : null;
$conn["PORT"] = isset($_ENV[$this->getKey("PORT", $key)]) ? $_ENV[$this->getKey("PORT", $key)] : null;
if($conn["TYPE"] == "sqlite")
{
if(!is_file($conn["DATABASE"]))
{
$conn["DATABASE"] = ROOT . DS . "databases" . DS . $conn["DATABASE"];
}
}
$ret[$connection] = $conn;
}
}