From adbbb6dc20b5fa273b186b726232220990b85cd8 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 5 Oct 2023 05:53:49 +0000 Subject: [PATCH 1/2] chore: add database overrides --- app/controllers/api/projects.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index dbe33bace4..480d9e3a34 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -121,7 +121,9 @@ App::post('/v1/projects') } } - if ($index = array_search('database_db_fra1_v14x_06', $databases)) { + $databaseOverride = App::getEnv('APP_DATABASE_OVERRIDE', null); + $index = array_search($databaseOverride, $databases); + if ($index) { $database = $databases[$index]; } else { $database = $databases[array_rand($databases)]; From 32ba34cba5a332d858559c9e53442320a32631a4 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Thu, 5 Oct 2023 05:58:52 +0000 Subject: [PATCH 2/2] chore: add database overrides --- app/controllers/api/projects.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/api/projects.php b/app/controllers/api/projects.php index 480d9e3a34..a01138225f 100644 --- a/app/controllers/api/projects.php +++ b/app/controllers/api/projects.php @@ -121,7 +121,7 @@ App::post('/v1/projects') } } - $databaseOverride = App::getEnv('APP_DATABASE_OVERRIDE', null); + $databaseOverride = App::getEnv('_APP_DATABASE_OVERRIDE', null); $index = array_search($databaseOverride, $databases); if ($index) { $database = $databases[$index];