From 13baf7660c05f1d3aa2409d042f2d6ec9583f1f5 Mon Sep 17 00:00:00 2001 From: Kregs Date: Sun, 12 Nov 2023 18:32:39 +0100 Subject: [PATCH] manage sqlite database in databases folder --- src/Core/Kernel/Application.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Core/Kernel/Application.php b/src/Core/Kernel/Application.php index 9d48058..361b7a6 100644 --- a/src/Core/Kernel/Application.php +++ b/src/Core/Kernel/Application.php @@ -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; } }