From 15793496e8d56769c792cf39673c6e6dea3ec4d9 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Thu, 28 Jun 2018 21:15:57 +0200 Subject: Preparing for complete rewrite.. --- main/app/system/Bakery/DatabaseTest.php | 52 --------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 main/app/system/Bakery/DatabaseTest.php (limited to 'main/app/system/Bakery/DatabaseTest.php') diff --git a/main/app/system/Bakery/DatabaseTest.php b/main/app/system/Bakery/DatabaseTest.php deleted file mode 100644 index 046c4c5..0000000 --- a/main/app/system/Bakery/DatabaseTest.php +++ /dev/null @@ -1,52 +0,0 @@ -ci->db; - - // Get config - $config = $this->ci->config; - - // Check params are valids - $dbParams = $config['db.default']; - if (!$dbParams) { - throw new \Exception("'default' database connection not found. Please double-check your configuration."); - } - - // Test database connection directly using PDO - try { - Capsule::connection()->getPdo(); - } catch (\PDOException $e) { - $message = "Could not connect to the database '{$dbParams['username']}@{$dbParams['host']}/{$dbParams['database']}':" . PHP_EOL; - $message .= "Exception: " . $e->getMessage() . PHP_EOL . PHP_EOL; - $message .= "Please check your database configuration and/or google the exception shown above and run command again."; - throw new \Exception($message); - } - - return TRUE; - } -} \ No newline at end of file -- cgit v1.2.3