From 30a7e70cb904bcb472b3cc73f4d7f1cc5ac27130 Mon Sep 17 00:00:00 2001 From: Hardik Thakker Date: Sat, 24 Jun 2023 12:57:39 +0530 Subject: [PATCH] Using Prefix from ENV variable during installation - Currently, during installation, we do not take into account the database table name prefix from env variables during installation (if specified by the user we ignore it and we try to generate a random prefix) - For me putting that auto-generated random prefix back into environment variables failed after install, causing the installation to die, so I added it in env variables before hand, but that didn't help as we were ignoring it. --- app/Http/Controllers/Install/Database.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Install/Database.php b/app/Http/Controllers/Install/Database.php index aa5ecff3a..695d83a81 100644 --- a/app/Http/Controllers/Install/Database.php +++ b/app/Http/Controllers/Install/Database.php @@ -34,9 +34,10 @@ class Database extends Controller $database = $request['database']; $username = $request['username']; $password = $request['password']; + $prefix = config("database.connections.$connection.prefix", null); // Check database connection - if (!Installer::createDbTables($host, $port, $database, $username, $password)) { + if (!Installer::createDbTables($host, $port, $database, $username, $password, $prefix)) { $response = [ 'status' => null, 'success' => false,